ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Event Macro running another macro inside (https://www.excelbanter.com/excel-discussion-misc-queries/123311-event-macro-running-another-macro-inside.html)

K1KKKA

Event Macro running another macro inside
 
Wonder if anyone can help, i would like an event macro to run another
macro once a cell reaches a certain number

IE a333 has a number 44 then the event macro will run another macro,

Do i use a "Call" statement for this to enable the macro to run?


Steve


Gary''s Student

Event Macro running another macro inside
 
In worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Cells(333, "A").Value = 44 Then
Application.EnableEvents = False
Call home
Application.EnableEvents = True
End If
End Sub


In a standard module:

Sub home()
MsgBox ("home")
End Sub

--
Gary's Student


"K1KKKA" wrote:

Wonder if anyone can help, i would like an event macro to run another
macro once a cell reaches a certain number

IE a333 has a number 44 then the event macro will run another macro,

Do i use a "Call" statement for this to enable the macro to run?


Steve




All times are GMT +1. The time now is 10:05 PM.

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