View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
slarbie slarbie is offline
external usenet poster
 
Posts: 53
Default Public Range Constant - how do I?

Do you mean one of the below?:

1) Public const MyRange as String = "MyRange"
2) Public const MyRange as String = "Range("MyRange")"

1) means I still have to refer to Range(MyRange) throughout the project. I
was hoping to be able to just refer to it as MyRange without having to Set it
in each procedure.
2) isn't acceptable syntax

Or did you mean something else? Does anyone have a solution to not having
to use the Set statement in each procedure?

"Gary''s Student" wrote:

If the Public range constant won't work, why not use a Public constant String
to hold the Range Address ??
--
Gary''s Student - gsnu200839


"slarbie" wrote:

In all the modules/procedures of my project, I'd like to be able to refer to
a specific named range as a constant. I imagined this:

Public const MyRange as Range = Range("MyRange")

at the top of a module, but it doesn't work. Can someone help with the
right way to do what I'm trying to get at here? Thanks!