Find ActiveCell.column
to be precise
sValue = Worksheets("sheet1").Cells(1,ActiveCell.Column).Va lue
should be
sValue = Worksheets("sheet1").Cells(1,ActiveCell.Column + 1).Value
--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote in message
...
That would be the hard way to do it
Dim lColumn as long
Dim sValue as string
lColumn = activecell.column
sValue = worksheets("sheet1").Cells(1, lColumn + 1).value
or
sValue = Worksheets("sheet1").Cells(1,ActiveCell.Column).Va lue
--
Regards,
Tom Ogilvy
"LindaMac" wrote in message
...
When I use the Activecell.column statement it returns a numeric value
for
the
column(ex: 27), I want the character value (ex: AA).
Here is a sample of my code, I always want to access row #1, but the
column
will vary based on the activecell location:
Dim sColumn as string
Dim sRangeName as string
Dim sValue as string
sColumn = activecell.column
sRangeName = sColumn + "1"
sValue = worksheets("sheet1").range(sRangeName).value
|