Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you find out the cell address your in ? 1

Status
Not open for further replies.

Jamie2002

Technical User
Sep 17, 2001
62
GB
How do you write code to return the cell address your in at any one time.

Would you set-up a variable then set the variable to the cell address.....?


thanks.
 
You can set a variable, but may not need to. You can just use ActiveCell.Address to get the address of the active cell.

AC
 
Hi,
ActiveCell.Address will return the address in A1 notation -- OK, but not as useful for programatically navigating around a spreadsheet.
So...
Code:
With ActiveCell
   lRow = .Row
   iCol = .Column
End With
and by incrimenting lRow and iCol, you can reference ANYWHERE on a sheet by way of...
Code:
Cells(lRow, iCol)
Just another alternative ;-) Skip,
metzgsk@voughtaircraft.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top