LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.newusers,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.office.developer.vba
external usenet poster
 
Posts: 11
Default 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()
Updates_Off
Application.WindowState = xlMinimized
Updates_On
Response = MsgBox("Test", vbYes + vbCritical, "Template Message")
Application.WindowState = xlMaximized
Application.Quit
End Sub



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How many iterations it takes to get to 0? Rick Excel Worksheet Functions 12 May 10th 07 10:46 PM
HELP: MsgBox takes 99% CPU usage... why? Dhruba Bandopadhyay New Users to Excel 0 May 22nd 06 01:23 PM
HELP: MsgBox takes 99% CPU usage... why? Dhruba Bandopadhyay Excel Worksheet Functions 0 May 22nd 06 01:23 PM
Save takes seconds vs. SaveAs/Save As takes minutes Andrew H[_3_] Excel Programming 0 August 17th 04 07:17 PM
VBE takes two tries to hear me clearly... Mark Tangard Excel Programming 3 September 8th 03 08:23 AM


All times are GMT +1. The time now is 05:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"