Brian.Crawford
Board Regular
- Joined
- Oct 3, 2007
- Messages
- 136
I have multiple worksheets where I want to access a named range using VBA. I want the range not to be sheet dependent (just for ex. the $A$1:$Q$1 part) as I will control which sheet that I use that range on with my VBA code. My code works when on the sheet that the ranges were origianlly defined on but not properly on the other sheets
(for ex. the range is set to mySheet!$G$1:$R$1) ie such as Worksheets(mySheet).Range("myDefinedRange") where "myDefinedRange" is not defined on "mySheet". The range shifts left by 1 column on the
Name Manager does not allow me to define a range without the sheet identifier. I want the definition to only be on one sheet as the number of sheets can change dynamically (new sheets added automatically) and I don't want to be naming ranges manually afterwards. I need these sheets to accomodate column & row insertions so need the automatic features of named ranges.
Sorry if this explaination is not that clear.
thanks in advance
(for ex. the range is set to mySheet!$G$1:$R$1) ie such as Worksheets(mySheet).Range("myDefinedRange") where "myDefinedRange" is not defined on "mySheet". The range shifts left by 1 column on the
Name Manager does not allow me to define a range without the sheet identifier. I want the definition to only be on one sheet as the number of sheets can change dynamically (new sheets added automatically) and I don't want to be naming ranges manually afterwards. I need these sheets to accomodate column & row insertions so need the automatic features of named ranges.
Sorry if this explaination is not that clear.
thanks in advance