Consulting

Results 1 to 3 of 3

Thread: dissable my own msgbox

  1. #1
    VBAX Tutor
    Joined
    Jul 2010
    Posts
    225
    Location

    dissable my own msgbox

    I have some code that when the sheet calculates a msgbox will pop up.

    I have another piece of code I want to run but would like to temp dissable my own code for the msgbox that pops up.

    I tried application.displayalerts= false but didn't seem to work.

    Am I missing something?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    AS your code invokes the MsgBox, you will have to code the logic that determines not to invoke it.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Mentor
    Joined
    Jun 2004
    Posts
    363
    Location
    This can be accomplished turning Application Events off then back on.

    [VBA]Application.EnableEvents = False
    'the code that would trigger the calculation event to fire
    'goes between the Application.EnableEvents lines
    Application.EnableEvents = True[/VBA]

Posting Permissions

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