![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 90
|
I locate a cell and save the positions:
SaveRow = ActiveCell.Row SaveCol = ActiveCell.Column If in Row 3, Col B - the values returned will be SaveRow - 3 ; SaveCol 2 (not B) The difficulty is returning to, or positioning to, Row/Column Cell using the saved values. What is the technique to select or activate a cell when the values are dynamically maintained? (Column is a numeric value.) |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Houston, TX
Posts: 60
|
How about this?
Dim wks As Worksheet Set wks = ActiveSheet wks.Cells(3, 2).Activate Of course, the numbers 3 and 2 can be replaced by variables containing these numbers. |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Hi
SaveRow = ActiveCell.Row SaveCol = ActiveCell.Column Save your data into Cell B3 as follows: SavePlace = Activecell.row & "," & activecell.column The string variable will then = SavePlace = "3,2" Now use this syntax to activate the cell Assuming the cell is on the activesheet cells(SavePlace).activate or cells(SavePlace).select Tom [ This Message was edited by: TsTom on 2002-03-27 09:32 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|