Macro; need to disable one when another is running

ed.ayers315

Board Regular
Joined
Dec 14, 2009
Messages
166
Hi Folks,

I need to disable or not allow one certian macro from running when another is running.

I reviewed previous posts and found
Code:
Application.Enable.Events = False

Unfortunately this disables other item I do need to run Like Spell Check.

When this macro
Code:
Sub COMPILE_VESSEL_DATA()
is started

I do not want this change event to run
Code:
Private Sub Subject_Title_51C_V1_Change()

Any suggestions
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
You could declare a Public variable

Code:
Public Abort as Boolean

Sub COMPILE_VESSEL_DATA()
    Abort = True
    
    Rem code

    Abort = False
End Sub

Sub Subject_Title_51C_V1_Change()
    If Abort then Exit Sub

    Rem code
End Sub
 
Upvote 0
mikerickson, thanks for the advice

I did not get that to work so I went with a workaround, not what I wanted but it will do.

Have a great weekend.
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,332
Members
449,077
Latest member
jmsotelo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top