PDA

View Full Version : VB - Excel Programming


N_R_D
06-19-2005, 08:01 AM
I have a quick question...

is there a way to have a cell selected like

Range("F11").Select

take the number out of the cell and use it as a variable....

like

Dim CellVar as Integer

CellVar = Range("F11").Select

Soemthing like that....

nikkiH
06-20-2005, 08:00 PM
You want the value that is in the selected cell? I think it's .Value property or some such. Been awhile since I messed with VBA, but I know I did that all the time.
And if you meant you wanted the cell itself, just keep a reference to it.
If you meant you wanted the row or column number, there are properties of a cell called Row and Column, I think.
The MSDN reference is your friend to find out what properties an object has.
http://msdn.microsoft.com/office/downloads/vba/default.aspx