Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Nan Nan is offline
external usenet poster
 
Posts: 23
Default Message while macro is executing

My macro takes several seconds to execute. I'd like some sort of message to
pop up and distract users from the flickering screen in the background while
the macro runs. Is there a way to display a blank screen, or at least ask
users to be patient, while the continues to run? I put in a message box, but
the macro stops until the user clicks "OK".

I appreciate any suggestions and thank you for taking time to help
--
TIA, Nan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Message while macro is executing

You can use the status bar:
Application.StatusBar

To prevent the "flickering screen", turn off screen updating before
your code executes and turn it back on once the code is complete:
Application.ScreenUpdating=False
'your code here
Application.ScreenUpdating=True

Nan wrote:
My macro takes several seconds to execute. I'd like some sort of message to
pop up and distract users from the flickering screen in the background while
the macro runs. Is there a way to display a blank screen, or at least ask
users to be patient, while the continues to run? I put in a message box, but
the macro stops until the user clicks "OK".

I appreciate any suggestions and thank you for taking time to help
--
TIA, Nan


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 320
Default Message while macro is executing

Manually create a text box (large) with bold 16-point font red text with your
message. Let's say it's called "Text Box 1". In VBA's immediate window,
(ctrl/G), type
activesheet.textboxes("Text box 1").visible=false
and it disappears. Now, in your macro:
Sub MyMacro()
activesheet.textboxes("Text box 1").visible=true
Application.screenupdating=false 'avoids flicker
'your regular code here
activesheet.textboxes("Text box 1").visible=false
Application.screenupdating = true
End Sub

Bob Umlas
Excel MVP

"Nan" wrote:

My macro takes several seconds to execute. I'd like some sort of message to
pop up and distract users from the flickering screen in the background while
the macro runs. Is there a way to display a blank screen, or at least ask
users to be patient, while the continues to run? I put in a message box, but
the macro stops until the user clicks "OK".

I appreciate any suggestions and thank you for taking time to help
--
TIA, Nan

  #4   Report Post  
Posted to microsoft.public.excel.programming
Nan Nan is offline
external usenet poster
 
Posts: 23
Default Message while macro is executing

Thank you so much! This is perfect!
--
TIA, Nan


"Bob Umlas, Excel MVP" wrote:

Manually create a text box (large) with bold 16-point font red text with your
message. Let's say it's called "Text Box 1". In VBA's immediate window,
(ctrl/G), type
activesheet.textboxes("Text box 1").visible=false
and it disappears. Now, in your macro:
Sub MyMacro()
activesheet.textboxes("Text box 1").visible=true
Application.screenupdating=false 'avoids flicker
'your regular code here
activesheet.textboxes("Text box 1").visible=false
Application.screenupdating = true
End Sub

Bob Umlas
Excel MVP

"Nan" wrote:

My macro takes several seconds to execute. I'd like some sort of message to
pop up and distract users from the flickering screen in the background while
the macro runs. Is there a way to display a blank screen, or at least ask
users to be patient, while the continues to run? I put in a message box, but
the macro stops until the user clicks "OK".

I appreciate any suggestions and thank you for taking time to help
--
TIA, Nan

Reply
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
Display a message when a macro is executing alexrs2k Excel Discussion (Misc queries) 2 September 11th 09 05:20 PM
Executing Macro Help [email protected] Excel Programming 7 May 1st 07 08:23 AM
executing a macro within another brian Excel Discussion (Misc queries) 3 July 5th 06 01:22 AM
Preventing macro from .xlt from executing in a .xls XxLicherxX Excel Programming 0 November 18th 05 06:34 PM
What macro is executing? Ken Loomis Excel Programming 3 October 13th 04 05:39 AM


All times are GMT +1. The time now is 04:17 AM.

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

About Us

"It's about Microsoft Excel"