Thread: Range syntax
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Range syntax

Hi Dr. Schwartz,

Try:

Set Headers = Range(Cells(ImNavigateRow - 1, 2), _
Cells(ImNavigateRow - 1, 2).End(xlToRight))


---
Regards,
Norman



"Dr.Schwartz" wrote in message
...
How come this piece of code does not work?

Dim Headers As Range
Set Headers = Range(Cells(ImNavigateRow - 1, 2), Cells(ImNavigateRow - 1,
2).End(xlToRight).Column)

I get an: Method 'Range' of object '_worksheet' failed error.

Can anyone correct this for me?
Thanks
The Doctor