Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Range with Variable name as parameter

Status
Not open for further replies.

MayFlowerNew

Programmer
Dec 21, 2004
20
CH
Hi All,

I have two string variables StartOfRange and EndOfRange which has valid values (eg "A120" "B233")
I want to select range from StartOfRange to EndOfRange
How do I do this?

Thanks
 

Very easy:
[tt]
Sub test()
Dim StartOfRange As String
Dim EndOfRange As String

StartOfRange = "A120"
EndOfRange = "B233"
Range(StartOfRange, EndOfRange).Select

End Sub
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top