View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default syntax - range name as a variable

Works for me. Did you declare range_string as string?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Peter Morris" <nospam.ple@se wrote in message
.uk...


I can select a named range like so :

range ("range_01").select

this works. but I want to make the selected range a variable like this:

range_string = "range_01"
range (range_string).select

This gives me error messages "method range of object global failed"


What is the correct syntax for doing this?