On Click Event
Is there an event in Excel VBA where I can trigger an event when the user
selects a cell? Sort of like an oncurrent event in Access, where an event is fired when the user clicks on a cell. As the user selects cells, I want an event to fire based on the activecell's value or contents. I know there is a Worksheet_Activate event - I'm looking for a Cell_Activate event. Thanks. -- Craig |
On Click Event
Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "Something just changed, time to act!" End Sub or Private Sub Worksheet_SelectionChange(ByVal Target As Range) MsgBox "A new cell has been selected, maybe act here?" End Sub One of the two is bound to be what you are after... |
On Click Event
The Worksheet_SelectionChange(ByVal Target As Range) event may work for you.
"Craig" wrote: Is there an event in Excel VBA where I can trigger an event when the user selects a cell? Sort of like an oncurrent event in Access, where an event is fired when the user clicks on a cell. As the user selects cells, I want an event to fire based on the activecell's value or contents. I know there is a Worksheet_Activate event - I'm looking for a Cell_Activate event. Thanks. -- Craig |
On Click Event
Thank you...
-- Craig "William Horton" wrote: The Worksheet_SelectionChange(ByVal Target As Range) event may work for you. "Craig" wrote: Is there an event in Excel VBA where I can trigger an event when the user selects a cell? Sort of like an oncurrent event in Access, where an event is fired when the user clicks on a cell. As the user selects cells, I want an event to fire based on the activecell's value or contents. I know there is a Worksheet_Activate event - I'm looking for a Cell_Activate event. Thanks. -- Craig |
All times are GMT +1. The time now is 10:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com