Run VBA automatically when criteria is met

Closed
Debs269 Posts 21 Registration date Monday October 15, 2012 Status Member Last seen August 18, 2016 - Sep 3, 2014 at 08:39 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Sep 4, 2014 at 03:06 AM
I want to be able to run a macro automatically when criteria is met..

If any cell in column A is change to "re-let" run "rowformat" macro

can anyone help?

Thanks
Debs

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Sep 4, 2014 at 03:06 AM
assuming macro rowforamt is in one of t;he modules
and your relevant sheet is Sheet1
right click of tab of sheet1 and click view code
in the window that comes up copy this EVENT CODE
when you type re-let in any cell in col. A automatically the macro rowformat will run

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 1 Then Exit Sub
Application.EnableEvents = False
If Target = "re-let" Then
rowformat
End If
msgbox "macro doe"
Application.EnableEvents = True

End Sub
0