View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach[_6_] Otto Moehrbach[_6_] is offline
external usenet poster
 
Posts: 201
Default how do i set an entire row or column to a range?

Use:
Set rngWs = Cells(1,ColNum).EntireColumn
HTH Otto

"strataguru" wrote in message
...
what if i only know of the column number (or row number) based on an int
value in a field called colNum?

for example - if in my code the logic determines that the range needs
to be 3 (meaning colNum = 3)

i'm getting an error "Method 'Range' of object '_Global' failed." with
the statement:

Set rngWs = Range(colNum).EntireColumn

Thanks!


---
Message posted from http://www.ExcelForum.com/