LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Address of Selection Prior to Clicking on a Cell

If I have cell b5 selected, and I click on cell e5, is there a way for
VBA to identify that it came from cell b5 before the click?

Code such as this can be set to be triggered when you click on a cell,
but can it tell you what cell it came from?


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("B5")) Is Nothing Then _
Range("B5").Value = 10
End Sub

Thank you,
Chris
 
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
Clicking on cell with email address opens Outlook Express Exceluser2400 Excel Discussion (Misc queries) 2 June 25th 09 08:19 PM
Returning a cell address in a msgbox, by selection via inputbox Ty FARAZ QURESHI Excel Discussion (Misc queries) 3 April 8th 09 12:57 PM
Lookup cell address of listbox selection LaDdIe Excel Programming 2 October 23rd 08 07:12 PM
determine selection.Address of cell from inactive sheet? Rich Excel Programming 2 September 20th 06 03:43 PM
Cell address in a given selection range. Dev Excel Programming 1 June 22nd 06 09:06 PM


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