[dba-Tech] Moving in an Excel worksheet, programmatically

Susan Harkins ssharkins at gmail.com
Fri Jul 25 16:21:07 CDT 2008


 Excel worksheet, programmatically


> Will you know what row and column the focus is currently on?  If so you 
> can do something like
>
> Worksheets("Sheet1").Cells(lngRow + 1,lngCol).select
>
> where lngRow= the number of the current row and lngCol is the current 
> column number.
>
> If you are wanting to grab the value of the cell:
>
> x=Worksheets("Sheet1").Cells(lngRow + 1,lngCol).value

=======I ended up going with Offset and it works fine, but it sure seems 
like a lot of work. I can't believe there's not a GoTo NextRow command --  
just seems like such an obvious task.

Susan H. 




More information about the dba-Tech mailing list