PDA

View Full Version : getting a Macro not to call another macro ??



nathan2314
07-17-2008, 08:58 AM
Hello all :hi:
Does anyone know how I can get a macro (call it 'temp') not to call a combo_change() macro.
I don't have a call command in macro temp I'm trying to run. But since the same sheet that I'm running temp() on has a combo box with combo_change() macro on it, when I run temp() it indirectly changes the combo box i guess and forces combo_change() to run. This is causing an error. Is there a way to tell temp() not to call combo_change()??
The error is coming from the fact that in temp() im hiding/unhiding certain rows and I guess when it tries to hide these rows it changes the combo box and makes combo_change() run. Then in combo_change() VBA tries to select certain cells but the rows that are to be hidden/unhidden from temp() are already selected and this causes an error. I would prefer not to have combo_change() run as it isn't necessary when I run temp().
Appreciate any help!!
:yes

JimmyTheHand
07-17-2008, 09:11 AM
Sub Temp
On Error Goto Exit_Sub
Application.EnableEvents = False

(core code of the macro)

Exit_Sub:
Application.EnableEvents = True
End Sub