![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 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? |
|
|
|
|
|
#2 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
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 |
|
Board Regular
Join Date: Mar 2002
Posts: 91
|
Nate, that message line is not found in the macro editor....
|
|
|
|
|
|
#4 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
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 |
|
New Member
Join Date: Feb 2002
Location: Louisiana USA
Posts: 26
|
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 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
I think if you run the following:
Code:
Sub test() Application.DisplayAlerts = False msgbox "Whassup?!" Application.DisplayAlerts = True End Sub Cheers, Nate [ This Message was edited by: NateO on 2002-03-13 14:22 ] |
|
|
|
|
|
#7 |
|
New Member
Join Date: Feb 2002
Location: Louisiana USA
Posts: 26
|
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.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|