Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remember where a user has clicked

Status
Not open for further replies.

faxof

Programmer
Dec 5, 2001
272
0
0
GB
is there a way of storing the last three cells a user clicks on?

any ideas?
faxof
 
dear faxof,

inform yourself about:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)


kind regards

Astrid

PS: perhaps the VBA forum would be more adequate

 
Hi
This probably should have been in the VBA forum but I'm still bored so...

With a named range "History", 4 rows by 2 columns in my case and labels in the first column as follows
Now
Last
2nd Last
3rd Last
this will created a history of selected cells

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Range("history")
    .Cells(4, 2) = .Cells(3, 2)
    .Cells(3, 2) = .Cells(2, 2)
    .Cells(2, 2) = .Cells(1, 2)
    .Cells(1, 2) = Target.Address(False, False)
End With
End Sub

;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top