Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
determine selection.Address of cell from inactive sheet?
Hello,
My report page displays formula based data from the data sheet. I need to increment up data data sheet (remove data from the lower row and then read data in the current row). The catch is that I don't want to leave the report sheet to move up to the next row in the data sheet. So is there a way to determine what row the data sheet is on without having to activate it? I noticed that selection.Address only works with ActiveSheets. Thanks, Rich |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
determine selection.Address of cell from inactive sheet?
Well, I came up with this: I have to prime the system by writing the current
row number of the data sheet in a cell in the report sheet. I read that number from my macro code and then decrement it by one and write the new number (which is the next upper row in the data sheet) in the cell in the report sheet. The the macro does its thing to the data sheet. Any suggestions appreciated if there is a better way to do this. "Rich" wrote: Hello, My report page displays formula based data from the data sheet. I need to increment up data data sheet (remove data from the lower row and then read data in the current row). The catch is that I don't want to leave the report sheet to move up to the next row in the data sheet. So is there a way to determine what row the data sheet is on without having to activate it? I noticed that selection.Address only works with ActiveSheets. Thanks, Rich |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
determine selection.Address of cell from inactive sheet?
Rich, the "Selection" object, without a specifier infront of it, implies
Activesheet.Selection. Therefore, it only replies to the activesheet. You can use worksheets("Data").selection.address and worksheets("Report").selection.address to specify what you want on each sheet. You may want to research some on implicit and explicit variables to ensure that you are always using the proper objects. Whenever possible, it is best to use explicit variables. Let me know if you'd like more info on this. Regards, Bill "Rich" wrote: Well, I came up with this: I have to prime the system by writing the current row number of the data sheet in a cell in the report sheet. I read that number from my macro code and then decrement it by one and write the new number (which is the next upper row in the data sheet) in the cell in the report sheet. The the macro does its thing to the data sheet. Any suggestions appreciated if there is a better way to do this. "Rich" wrote: Hello, My report page displays formula based data from the data sheet. I need to increment up data data sheet (remove data from the lower row and then read data in the current row). The catch is that I don't want to leave the report sheet to move up to the next row in the data sheet. So is there a way to determine what row the data sheet is on without having to activate it? I noticed that selection.Address only works with ActiveSheets. Thanks, Rich |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Determine cell address of last entry in a row | Excel Discussion (Misc queries) | |||
How to determine the column letter from Cell address | Excel Worksheet Functions | |||
Cell address in a given selection range. | Excel Programming | |||
Determine if Cell Address is within a Range | Excel Worksheet Functions | |||
determine if cell address is within a range of cells | Excel Programming |