Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Displaying a message while a macro is running

hi

I have a macro that takes a few seconds to run. is there a way to have a msg box appear when the button to run the macro is clicked with a message like "processing" for example and then disapear when the macro is finished running ie there are no buttons that the user can play wit

Many thank
kevin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 253
Default Displaying a message while a macro is running

Hi ,

An easy way is to use the statusbar (well explained in help - see
displaystatusbar as well).
Another way
1.start a sub (start sub ..?) that call a form
2.from the form Activate event call the main sub
3. In the main sub, change the value on the form you want and use
form.repaint to update it.

Regards,

Jean-Yves

"kevin" wrote in message
...
hi,

I have a macro that takes a few seconds to run. is there a way to have a

msg box appear when the button to run the macro is clicked with a message
like "processing" for example and then disapear when the macro is finished
running ie there are no buttons that the user can play with

Many thanks
kevin



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Displaying a message while a macro is running

Hi Kevin,

kevin wrote:
I have a macro that takes a few seconds to run. is there a way to have a msg box appear when the button to run the macro is
clicked with a message like "processing" for example and then disapear when the macro is finished running ie there are no
buttons that the user can play with


another possibility:
Provide from the Control-Toolbox a label on your sheet
and mark and format it over the Properties-window.
At the beginning of your procedure set the Visible-property on True
and at the end again on False.

Sub ShowLabel()
Worksheets(1).Label1.Visible = True
' your Code

' test
Application.Wait (Now + TimeValue("0:00:10"))
Worksheets(1).Label1.Visible = False
End Sub

--
Mit freundlichen Grüssen

Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Displaying a message while a macro is running

I devised a simple way to let them know the macro was working. Assuming the
macro is going to change some value or values in a cell on the spreadsheet,
I would make that cell visible on the sheet (if it wasn't already), put the
word PROCESSING in the cell, let the macro do its thing and then overwrite
PROCESSING with the results of the macro.

Sub
Sheets("Analysis").Activate
Application.ScreenUpdating = True
Range("L42").Select
Range("L42").Value = "Calculating Solution Codes"
Application.ScreenUpdating = False

'Your macro runs here

Range("L42").Value = Your macro results
Application.ScreenUpdating = True
Application.ScreenUpdating = False
End Sub

Mike F

"kevin" wrote in message
...
hi,

I have a macro that takes a few seconds to run. is there a way to have a

msg box appear when the button to run the macro is clicked with a message
like "processing" for example and then disapear when the macro is finished
running ie there are no buttons that the user can play with

Many thanks
kevin



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
If Formula for displaying a message Sherees Excel Discussion (Misc queries) 9 January 16th 10 12:12 PM
displaying running total of value entered in same cell? Colin Fisher Excel Worksheet Functions 6 January 21st 09 09:52 PM
message box while macro is running wendy Excel Programming 9 April 15th 04 12:15 AM
Displaying a Message and a Beep ZAK Excel Programming 1 November 11th 03 11:10 AM
Message Window to tell user "Macro Running" keyt Excel Programming 2 October 4th 03 05:28 PM


All times are GMT +1. The time now is 08:09 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"