View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default VBA Range Variables...

Hi
you need a comma not a colon
Range(Start, Final).Select

the colon goes in the text address for the range
Range("A1:A5").Select

or even
Range(Start.Address & ":" & Final.Address).Select

regards
Paul

On Feb 15, 11:39 am, "MarkHear1" wrote:
I have tried written the following code, however it's incorrect and I
can't seem to work out how to correct it. Could anybody offer any help
please?

Sub test()

Range("A1").Select
Dim Start As Range
Set Start = ActiveCell

Range("a5").Select
Dim Final As Range
Set Final = ActiveCell

Range (Start:Final).Select

End Sub

Many Thanks
Mark