ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro that shows a cell address when pressing the down or up key (https://www.excelbanter.com/excel-programming/347259-macro-shows-cell-address-when-pressing-down-up-key.html)

cyberdude

Macro that shows a cell address when pressing the down or up key
 
Hi,

I would like to write a macro that popps up a message box showing the
current cell address when I press the down or up key to move down or up
a column. Do you have any idea about how to make this? Or would you
show me your code doing it? Thank you in advance.

David


Gary Keramidas

Macro that shows a cell address when pressing the down or up key
 
put this on the sheet code page

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox ActiveCell.Address
End Sub

--


Gary


"cyberdude" wrote in message
oups.com...
Hi,

I would like to write a macro that popps up a message box showing the
current cell address when I press the down or up key to move down or up
a column. Do you have any idea about how to make this? Or would you
show me your code doing it? Thank you in advance.

David




David McRitchie

Macro that shows a cell address when pressing the down or up key
 
Hi David,
The name box at the left of the formula bar would also show the address.

But from your question it looks like you want to activate the macro with a MsgBox
from the up down arrow keys, and that would be a disaster in my opinion, but
you could use ONKEY to trigger the macro.
http://www.mvps.org/dmcritchie/excel/whortx2k.htm#onkey
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Gary Keramidas" <GKeramidasATmsn.com wrote in message ...
put this on the sheet code page

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox ActiveCell.Address
End Sub

--


Gary


"cyberdude" wrote in message
oups.com...
Hi,

I would like to write a macro that popps up a message box showing the
current cell address when I press the down or up key to move down or up
a column. Do you have any idea about how to make this? Or would you
show me your code doing it? Thank you in advance.

David







All times are GMT +1. The time now is 02:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com