View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Set a Range to all of the first row

Try this Kevin

The worksheet tab is named Z

Sub test()
Dim rgeSearch1 As Range
Dim rgeSearch2 As Range
Set rgeSearch1 = ThisWorkbook.Worksheets("Z").Columns(1)
Set rgeSearch2 = ThisWorkbook.Worksheets("Z").Rows(1)
End Sub



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Kevin McCartney" wrote in message ...
I'd like to do two things, set a range to all of row one
and set a second range to all of column A

Please help with the correct code to use. currently I have

Set rgeSearch1 = Application.Worksheets(Z).column(1)
Set rgeSearch1 = Application.Worksheets(Z).rows(1)

Thanks

Best regards
KM