Thread
:
What am I doing wrong with this VBA range?
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
What am I doing wrong with this VBA range?
try
.range(cells(2,refcolumn),cells(4,refcolumn))
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"jbarrington" <"jbarrington -at- comcast period net" wrote in message
...
This works:
Dim myRange As Range
Set myRange = Worksheets("Collection").Range("H2:H4")
But the change below doesn't work for some reason and presents an error:
Dim refColumn As String
Dim myRange As Range
refColumn = "H"
Set myRange = Worksheets("Collection").Range(refColumn & "2:" &
refColumn & "4")
What have I done wrong?
Thanks in advance.
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett