View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
LetMeDoIt LetMeDoIt is offline
external usenet poster
 
Posts: 25
Default checking and setting a value to a range in VBA

On May 1, 11:54*am, LetMeDoIt wrote:
Greetings,
I'm trying to do an easy thing (I think) but have not succeeded thus
far.

I created a name range manually in a spreadsheet, but need to check
via VBA code for the value of that range, then if it changed to its
default, reset that range to a specific value.

To check the that the row has not changed, I do the following: iRow =
Range("=MyRange").Row
and thus if this is not my original value, I reassigned it ( this is
where I'm getting an error msg in the code).

Or alternatively, I'd like to dynamically set that range to soemthing specific, like: "sheet1!$B$10:$B$30"

I'm using excel 2003.

Many thanks.
CG