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

How to find the location of the previous activecell?
Appreciate the help.
MVM
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Previous active cell

Hi
one brute-force way would be to use the SelectionChange event to store the
old active cell in a static variable. what are you trying to do with this
information

--
Regards
Frank Kabel
Frankfurt, Germany
"MVM" schrieb im Newsbeitrag
...
How to find the location of the previous activecell?
Appreciate the help.
MVM



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

Like, if user moves from G6 to L8, you want to return a reference to
G6? You'll have to carry the reference along either in a hidden
sheet or in a variable with scope outside of a subroutine. Example:

Option Explicit

Dim sCurrentAddress As String
Dim sOldAddress As String

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
sOldAddress = sCurrentAddress
sCurrentAddress = Target.Address
MsgBox "From " & sOldAddress
End Sub

Ray at work


"MVM" wrote in message
...
How to find the location of the previous activecell?
Appreciate the help.
MVM



  #4   Report Post  
Posted to microsoft.public.excel.programming
MVM MVM is offline
external usenet poster
 
Posts: 53
Default Previous active cell


Thank you.
I have two columns, say C & D.
if user enters in D and C is empty, I display a message and move the active
cell in C (same row). when user enters a value in C and then enters in D and
hit RETURN key, I don't want to display the message, simply move to next row
C.

how to find I hit RETURN?
or the previous cell is in D?

is there any way to display a tool tip when user moves to column D with
empty C?

Thanks
MVM

"Frank Kabel" wrote:

Hi
one brute-force way would be to use the SelectionChange event to store the
old active cell in a static variable. what are you trying to do with this
information

--
Regards
Frank Kabel
Frankfurt, Germany
"MVM" schrieb im Newsbeitrag
...
How to find the location of the previous activecell?
Appreciate the help.
MVM




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
Row select mode to highlight active row of active cell Bart Fay[_2_] Excel Discussion (Misc queries) 0 May 11th 10 09:34 PM
How to return to the previous active sheet after hyperlink? Terry Excel Worksheet Functions 5 March 21st 10 02:53 AM
3-Color Scale Vlookup for Current Month/Previous/Pre-Previous NeoFax Excel Discussion (Misc queries) 2 January 8th 10 07:04 PM
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell [email protected] Excel Worksheet Functions 2 November 7th 07 09:39 AM
referring to formula in a non active cell from active cell nickname Excel Discussion (Misc queries) 1 June 21st 07 12:11 PM


All times are GMT +1. The time now is 06:30 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"