LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default setting a range variable equal to the value of a string variable

Is it possible to set a range variable as the value of a strin
variable. For instance, I'm trying to set a string variable equal t
the address of several discontiguous cells, then set the a rang
variable equal to the cell locations and put them in a chart. I'v
loaded several cell locations in a string variable so the variable ha
a value like:

StrVar = "A1,A7,A34,A34"

But if I try

RangeVar = Range(StrVar)

or

RangeVar = Range("StrVar")

It tries to evluate StrVar as a cell or cell name. Can I get the rang
mode to use the value of StrVar instead of the variable itself

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting a string variable as the file name [email protected] Excel Discussion (Misc queries) 1 March 28th 07 11:10 PM
Setting range value to a variable Todd Excel Programming 4 June 2nd 04 04:51 PM
How do I convert an integer variable to a string variable? dumbass Excel Programming 2 May 21st 04 07:34 PM
Join string with variable name to get variable value Dianne Excel Programming 6 February 12th 04 04:24 AM
Setting up a variable print range Gary[_5_] Excel Programming 5 July 31st 03 04:32 AM


All times are GMT +1. The time now is 12:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"