Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 7 of 7

Thread: Getting rid of the Macro ! dialog box

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    91
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have buttons with macros assigned to generate randon numbers. The result is to be displayed in A1 of the same sheet. Each time the macro is run, a dialog box pops up that states "Random number generation - Output range will overwrite existing data. Press OK to overwrite data in range"
    How can I stop this window from popping up and just display the result where I want it to?

  2. #2
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Go into the macro and delete the line that says:

    msgbox "Random number generation - Output range will overwrite existing data. Press OK to overwrite data in range"


    Cheers, Nate

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    91
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Nate, that message line is not found in the macro editor....

  4. #4
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    No? Show me the code

    You might be looking at the wrong code, wrong module, etc.. It would be nice if you could right click on the button, click assign macro, then click edit. That should get you to the right code. Then look for a msgbox line of code and extermiNate it with extreme prejudice.

    Cheers, Nate

    [ This Message was edited by: NateO on 2002-03-13 14:08 ]

  5. #5
    New Member
    Join Date
    Feb 2002
    Location
    Louisiana USA
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    have buttons with macros assigned to generate randon numbers. The result is to be displayed in A1 of the
    same sheet. Each time the macro is run, a dialog box pops up that states "Random number generation -
    Output range will overwrite existing data. Press OK to overwrite data in range"
    How can I stop this window from popping up and just display the result where I want it to?


    You can try this and see if it corrects the problem.

    Sub
    Application.DisplayAlerts = False
    Your Code
    Application.DisplayAlerts = True
    End Sub

  6. #6
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I think if you run the following:

    Code:
    Sub test() 
    Application.DisplayAlerts = False 
    msgbox "Whassup?!"
    Application.DisplayAlerts = True 
    End Sub
    You're gettin' a message box dude.

    Cheers,

    Nate

    [ This Message was edited by: NateO on 2002-03-13 14:22 ]

  7. #7
    New Member
    Join Date
    Feb 2002
    Location
    Louisiana USA
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You're right, If he is getting a message box it will still pop up. I was thinking he may be getting an alert. If there is a code for a message box, it will have to be deleted.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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