Macro to run when cell click
I'm trying to write a macro to call a userform when you click in a cell. This
is what i've got which works when someone types a character in the cell. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$C$5" Then userform1.show End If End Sub Any way to change this so the form is called when the cell is selected? |
Macro to run when cell click
Just make it SelectionChange should work.
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = "$C$5" Then userform1.show End If End Sub "Brad" wrote: I'm trying to write a macro to call a userform when you click in a cell. This is what i've got which works when someone types a character in the cell. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$C$5" Then userform1.show End If End Sub Any way to change this so the form is called when the cell is selected? |
All times are GMT +1. The time now is 12:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com