Getting rid of the Macro ! dialog box

mqarep

Board Regular
Joined
Mar 12, 2002
Messages
91
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?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
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
 
Upvote 0
No? Show me the code :oops:

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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,549
Messages
6,114,261
Members
448,558
Latest member
aivin

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