PDA

View Full Version : Solved: Cell range as a variable



fif_rumac
01-23-2007, 06:22 AM
Hello there,

I need to set part of a cell range as a variable to call in different functions...

if 'ref' is the column, for example I would like to be able to have code something like this:

ref = A

Range("ref1").Select

I am quite new to VBA and I'm still learning...

Can anyone help?

Thanks,

fif_rumac

OBP
01-23-2007, 06:31 AM
try this for starters
Dim ref1 As String
ref = "C"
Range(ref1 & "1").Select