Variables in Excel

L

Lang

Hi,

I'm having a hard time figuring out how to set a variable in a macro equal
to the value in a cell. I then want to be able to use that value with the
select method to select a number of rows equal to the value of my variable.

The big problem for me is going from the spreadsheet to the macro with a
value.
Any help appreciated.

Thanks,

Lang
 
L

Lang

thanks for the reply Don! I didn't get a chance to check this today, but
will try soon.

Lang
 
I

i-Zapp

to use the value of a range (cell) in a macro, use the syntax:

Code
-------------------
myvalue = range("a1").value
-------------------

where "a1" is value of interest.
then, to select a row use

Code
 
Top