HELP: MsgBox takes 99% CPU usage... why?

I got a problem with my Excel macro. It does some calculations then displays 
a message box. However the message box is actually

displayed before the window maximize so what actually happens is the user 
sees the minimised Excel blinking in the taskbar.

The problem is I have been told this blinking uses 50% of the CPU or almost 
100% CPU usage. Is this normal? Is it waiting in a for

loop prompt?

Public Sub Updates_Off()
    With Application
        .ScreenUpdating = False
        .EnableEvents = False
        .Calculation = xlCalculationManual
    End With
End Sub

Public Sub Updates_On()
    With Application
        .StatusBar = False
        .ScreenUpdating = True
        .DisplayAlerts = True
        .EnableEvents = True
        .EnableCancelKey = xlInterrupt
        .Cursor = xlDefault
        .Calculation = xlCalculationAutomatic
    End With
End Sub

Private Sub Workbook_Open()
    Application.WindowState = xlMinimized
    Response = MsgBox("Test", vbYes + vbCritical, "Template Message")
    Application.WindowState = xlMaximized
End Sub

Dhruba Bandopadhyay
5/22/2006, 12:23:17 PM

2 replies , 4/14/2008, 3:04:48 AM
Hi All, I have 10 columns and i am running macro , Macro part is ok at the end i need to add some msgbox. how should i do ....I need msgbox to display result using counta formula for a Range ("B:B"). Suppose if range("B:B") has 100 values or Text then it should display "you have 100 to work" Similarly is it possible to add countif function in msgbox - countif(Range("A:D"),"ok") Thanks in advance

muddan madhu
Macro - MsgBox
2 replies , 12/6/2006, 4:48:53 AM
Hi, How can i give a msg box with multiple text? When I give MsgBox ("1. TestA 2. TestB 3. TestC"), all these are comming horizontally. I want the msg box like: 1. TestA 2. TestB 3. TestC Is this possible? -Dileep

Dileep Chandran
1 replies , 4/26/2005, 3:44:21 AM
I've been trying to add a yes/no MSgbox to a macro that when you click yes the macro continues if you click no then the macro stop and ends the macro. I've got to point where the msgbox comes up and if you click yes it keeps going BUT I'm stuck how to tell is to end. Note... I've had no formal training in VB ;-) ' Keyboard Shortcut: Ctrl+Shift+U ' Dim Response As Integer ' Displays a message box with the yes and no options. Response = MsgBox(prompt:="Select 'Yes' or 'No'.", Buttons:=vbYesNo) ' If statement to check if the yes button was selected. If Response = vbYes Then MsgBox "You selected 'Yes'." Else ' The no button was selected. MsgBox "You selected 'No'." End If Range("A2").Select Application.Goto Reference:="R25000C1" ActiveWindow.ScrollRow = 24922 ActiveWindow.ScrollRow = 1 Range("A1:A25000").Select Range("A25000").Activate Selection.AutoFilter Range("A2").Select Application.Goto Reference:="R25000C1" ActiveWindow.ScrollRow = 1 Range("A2:A25000").Select Range("A25000").Activate Selection.AutoFilter Field:=1, Criteria1:="=*--*", Operator:=xlOr, _ Criteria2:="=*personal data*" ActiveWindow.SmallScroll Down:=-132 Selection.EntireRow.Delete blah blah end sub Thanks again Wildman

5 replies , 6/17/2009, 5:22:08 PM
I have been search the web for hours looking for example spreadsheets using MsgBox to no avail. Can someone direct me in the right direction?

Ed Davis
Problem with array and msgbox
1 replies , 10/29/2004, 7:57:19 AM
Thank you :cool -- aking198 ----------------------------------------------------------------------- aking1987's Profile: View this thread:

"customer" msgbox.
1 replies , 7/13/2007, 7:54:02 PM
I need a pop up box with large fonts then the msgbox is using. Is there a way that I can change that FONTs size and color? if not were do I go to find some way to have a "customer" msgbox. Thanx, David

EXCEL macro with a msgbox
2 replies , 10/23/2003, 9:07:54 PM
I have written a number of macros. Now I would like to add a msgbox just as the macro starts stating what that particular macro does and give an option to either proceed with the macro of decline to run it Can/will someone help me with a little code? Please and thanks -- Norton Professional 2004 says this email is clean...believe it

msgbox / inputbox etc
2 replies , 3/15/2006, 10:47:42 AM
Hi, I'm using a vlookup formule to translate names into codes in a really big excel sheet. The problem is that if there are two time the same name, the system will take the first code to translate the name without warning me. It can happens that the system choose then for the wrong code. Therefore, i would like to use a msgbox or inputbox to warn me that there are two or more same names and to let me choose directly between the different codes. Is it possible ?? en if yes how can i do that? thanks a lot for any help...

2 replies , 10/25/2004, 12:20:25 PM
Hi, How can you insert a enter in your MsgBox? Fe. --------------------------------------------------------------------------- MsgBox prompt:="Please note, there a no files in this directory." "Please log off know, and restart the application." _ , Title:="OOCL Extractor, release version 5.1", Buttons:=vbOKOnly + vbExclamation --------------------------------------------------------------------------- This wil not work, so what is the solution for this? Thanks as always, Mischa

Macro - msgbox
1 replies , 9/13/2006, 2:13:02 PM
I have a rather large macro, and I want to give the user a chance to exit the macro before it runs. I need a msgbox (or a dialogue?) with a warning, and the user will select either OK (to run the defined macro) or cancel (to exit and not run the macro). Can anyone help me? Thanks:)

2 replies , 6/24/2009, 12:54:04 PM
I want to tet rid of a MsgBox (and the constraint that triggers it) that keeps appearing in a date field. However, I cannot find the code for it in the various VBA windows or module. I don't believe worksheet is compiled in any way. Any ideas where this piece of code might be found? Thanks.

Msgbox in VBScript Job Step?
5 replies , 1/23/2004, 3:09:01 PM
It seems to be impossible to throw a Msgbox in a VBScript job step. I can understand why this would be on a remote server, but why on a local machine won't it create a message box? The job just hangs. This works: Sub main() Set DMOServer = CreateObject("SQLDMO.SQLServer") DMOServer.LoginSecure = True DMOServer.Connect "MYSERVER" Print "I am running step 1" Print "My server is " & DMOServer.Name DMOServer.Disconnect Set DMOServer = Nothing End Sub This hangs: Sub main() Msgbox "Hello" End Sub

Custom MsgBox
1 replies , 7/13/2007, 7:56:05 PM
I am trying to get the FONTs in a msgbox larger and a different color. Is that possible? If not how do I construct a custom msgbox that will pop up when the workbook is opened? Thanx, David

I have a VBA application which people install by copying to their microsoft\word\startup folder I would like to display a message the first time the user runs this template. The tempate contains a sub autoexec that runs then the template is first run Sub autoexec() Dim mastatus As String .... If mastatus = "First time run" Then ... do welcome to first time users stuff .... set mastatus to this is not done in future beep msgbox "hello ... " The autoexec runs fine and I hear the beep the first time it is run. Bur the msgbox causes the following error... "The command cannot be performed because a dialog box is open. Click Ok, and then close open dialog boxes to continue" I guess this measn taht the welcome message is preventing Word from correctrly opening up. How can I display a message the first time the .dotm file is used and not interfere with word's opening process. Any help will be gratefully received, PeterEvans

IF Function and msgbox
6 replies , 7/19/2006, 1:39:02 PM
Gentle people I'm a beginner... real beginner .. and I have this problem I have two inpuBox with two questions about the amount of materials ( eg. amount of Material A and Amount of Material B) then I made calculations ( eg. material A 2000 litrs * dens 1.3 = 2600 kg and material B 1000 litrs * dens 1.3 = 1300 kg) and my problem is made a Msgbox show the bigest Can you hlp ?

web service and msgbox
1 replies , 9/30/2004, 4:10:04 PM
Where should I check for the security between a web service and the sql msgbox? If my web service cannot reach the msgbox because of security is there a way to add it? Thanks

MsgBox alerts
1 replies , 1/19/2006, 12:30:06 PM
I have an excel workbook that at certain key dates (for example on the 5th Feb and the 10th March etc etc) would like to have Alert Box or MsgBox pop up by way of a reminder to complete a certain task (this would take the shape of reviewing another part of the workbook for instance) Is this possible? I have started by listing all the years dates in one tab vertically and then writing the alert information in the adjacent cell, then using a =today() was hoping to link the two together… but have come to a dead end on how to do this. Many thanks for any help and I hope this makes some sense… Andy

Help with MsgBox...
3 replies , 12/28/2004, 11:15:01 PM
When the user selects the number 350 from a list validated cell or enters 350 into a list validated cell I want to use MsgBox or a UserForm to display a message. On the MsgBox or UserForm I want two options, OK and another button that will clear the entry of 350 from the cell, like a Cancel button or something along those lines. Thanks!

Excel MsgBox from .NET - howto
0 replies , 2/3/2006, 3:51:51 PM
Hi, is it possible to open an Excel MsgBox from .NET using the Microsoft PIAs? I know that it does work for an inputbox, via Excel.Application.InputBox() Thanks, Bruce

Bruce Spunkmeyer
Msgbox loop
2 replies , 2/13/2009, 3:04:01 PM
I am trying to establish a macro with a message box to loop through until the Yes button is pressed. I am using Excel 2003. My code is below: Sub Test() Dim PartNum As String Do PartNum = InputBox("Enter in Part Number:", "Part Number") If PartNum = "" Then End If MsgBox("The Part Number is: " & PartNum, vbYesNo) <> vbYes Then End If Loop Until vbYesNo = vbYes Worksheets("Sheet1").Range("H10").Value = PartNum End Sub

Msgbox on open
0 replies , 9/25/2010, 3:44:39 PM
Column "A" has a list of dates. When workbook is opened I'd like a message box to display "Run test" if that date is greater than 30 days. Once "the OK button" is selected then the Date that "the OK button" was selected be added in Column "B" next to the date in Column "A". I'm familiar with visual basic code, just don't know how to write it. Thanks so much in advance!!

Is there any way I can make a MsgBox open up in the bottom-right corner, or some other location, instead of the center of the sheet? Thanks, Russ

MsgBox with Yes/No
2 replies , 8/8/2009, 11:20:03 AM
"Answer = MsgBox("Do you want to continue ?", vbYesNo)" displays with the YES button as the default. Is it possible to have the NO button as the default? TIA Chris

Chris Watts
Holding A MSGBOX
1 replies , 6/18/2009, 11:37:01 AM
Is there a way to keep a MsgBox running (on the Screen) Until the if statement is complete?

Ed Davis
Valua of a cel as message in a MsgBox
4 replies , 11/16/2006, 4:58:41 PM
Hello Excellers, How can i assign a valua (text) that is in cel B2 of an active sheet to a part of the message of a MsgBox ? Thanks for your attention, Greetz Reijer.

Typing Chinese Characters in msgbox
0 replies , 9/16/2007, 5:43:02 PM
Hi, I am creating a userform which in some ways displaying a error messages. I want to type English and Chinese translation together but looks like I cannot write in the code. It just shows as ??. But in the normal excel cells there is no problem typing Chinese. Is there anyway to fix this problem or I have to stick with only English message. Thanks for your help

msgbox vbyesno
2 replies , 7/23/2007, 6:05:23 PM
dear all, I'm trying to create a code to appear a msgbox type vbyesno, but I don't now how create it. And I need help with the code, if the user click in yes or in no. for example, if the user click in yes, the workbook save and close; if the user click in no the worbook only close. thanks andr=E9.

MsgBox in footer
1 replies , 6/10/2005, 3:20:09 PM
Hi everyone. I have a spreadsheet that I would like to put the message, "Last updated on: xx/xx/xxxx" in the center section of the footer. The date is never consistent, so the user would need to be prompted to enter the date. I am envisioning something like a message box.?? Is something like this even possible? If so, any suggestions you could pass along to help me find resources to help with this would be very much appreciated. Thanks very much!

Sheet msgbox
2 replies , 4/15/2004, 10:55:01 AM
I have a msgbox that I wish to appear when a sheet is active, I hav tried the code: Private Sub Workbook_SheetActivate But that doesnt seem to be working. Any ideas as to how to fix thi problem? Regards -- Message posted from

Fraggs <
how to assign a act to "yes" when use the MsgBox
1 replies , 11/2/2003, 2:37:00 PM
thanks .

MsgBox with condition and showing details
2 replies , 8/16/2005, 4:52:12 PM
I have two columns, one called NAME and the other BIRTHDAY. I want a MsgBox that appear when a cell in BIRTHDAY take place during the current month, and display the name of the person.Something like "JASON, PETER and JOHN HAVE BIRTHDAY THIS MONTH" . Moreover, I want the MsgBox to pup up as soon as I open the workbook. Could somebody help me with the code?

msgbox hidden
2 replies , 8/2/2004, 8:40:51 PM
I want to have a macro to check for the existance of a subject before sending a message. I have added the below listed code to the ThisOutlookSession. It seems to run ok except for the fact the that msgbox comes up behind the mail message and can't be seen. How do I make the msgbox visible in front of the mail message? I am using Outlook 2003. thanks, bob ----------------------------------------- Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim myMessage As MailItem Dim myReply As Integer Set myMessage = Item If Len(myMessage.Subject) = 0 Then myReply = MsgBox("There is no subject." & vbLf & "Do you want to send this anyway?", _ vbYesNo Or vbInformation, _ "Subject Reminder") If myReply = vbNo Then Cancel = True End If End Sub

Bob Weiner
MsgBox &array
3 replies , 10/2/2009, 3:23:02 PM
Hi, Is that a way to out put the contents of an array of string using msgbox.

VBA - MsgBox icons missing
3 replies , 5/16/2005, 9:20:55 AM
Raw beginner here.... My statement - MsgBox "my text", vbExclamation produces appropriate text but only a *generic* XL icon so does vbQuestion so does vbCritical etc Am I missing some files? Have I got it wrong? Thanks IA

Ian Page
I have a macro that receives a variable that is input by a user (&rsp1) I want a MsgBox to display “Do you want to print off the data for “and the variable &rsp1. The MsgBox lookes like:- MsgBox "Do you want to print off the data for &rsp1 - 1?", vbYesNo, "Do you want to Print off” Additionally, if I know the location of a particular file, how do I incorporate an open to it? Any assistance offered will be appreciated.