Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Previous active cell

Is there a way to capture the address of the last previous active cell. I am
trying to do this in the selection change code of a sheet but I cannot make
it work.

Thank you,

Steven
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Previous active cell

See if this helps. Place in worksheet module
Public OldVALUE
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox OldVALUE
OldVALUE = Target
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Steven" wrote in message
...
Is there a way to capture the address of the last previous active cell. I
am
trying to do this in the selection change code of a sheet but I cannot
make
it work.

Thank you,

Steven


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Previous active cell

That is it. I am doing some things in the selection change and now I see
that I have to make that the last line of code in the sub routine so that
when I go to the next cell I am doing the testing before updating the
oldvalue again.

Thank you,

Steven

Thank you for your help.

"Don Guillett" wrote:

See if this helps. Place in worksheet module
Public OldVALUE
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox OldVALUE
OldVALUE = Target
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Steven" wrote in message
...
Is there a way to capture the address of the last previous active cell. I
am
trying to do this in the selection change code of a sheet but I cannot
make
it work.

Thank you,

Steven



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
How to return to the previous active sheet after hyperlink? Terry Excel Worksheet Functions 5 March 21st 10 02:53 AM
Highlight active cell and de-highlight previous cell dmbuso Excel Programming 3 April 7th 07 04:22 PM
Find cell address of previous active cell Google Excel Excel Programming 1 November 21st 06 12:14 AM
how to compare the active cell value to the previous cell's value crimsonkng Excel Programming 2 December 5th 05 03:19 PM
Previous active cell MVM Excel Programming 3 January 2nd 05 10:29 PM


All times are GMT +1. The time now is 04:02 PM.

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

About Us

"It's about Microsoft Excel"