Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine cell address of last entry in a row NDBC Excel Discussion (Misc queries) 3 July 22nd 09 04:27 AM
How to determine the column letter from Cell address Jean Excel Worksheet Functions 6 July 24th 06 03:04 AM
Cell address in a given selection range. Dev Excel Programming 1 June 22nd 06 09:06 PM
Determine if Cell Address is within a Range John Michl Excel Worksheet Functions 4 December 22nd 05 07:59 PM
determine if cell address is within a range of cells SteelDetailer[_2_] Excel Programming 4 November 4th 05 04:04 PM


All times are GMT +1. The time now is 07:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"