Consulting

Results 1 to 2 of 2

Thread: getting a Macro not to call another macro ??

  1. #1

    getting a Macro not to call another macro ??

    Hello all
    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!!

  2. #2
    [vba]Sub Temp
    On Error Goto Exit_Sub
    Application.EnableEvents = False

    (core code of the macro)

    Exit_Sub:
    Application.EnableEvents = True
    End Sub
    [/vba]
    -------------------------------------------------
    The more details you give, the easier it is to understand your question. Don't save the effort, tell us twice rather than not at all. The amount of info you give strongly influences the quality of answer, and also how fast you get it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •