Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying messages
Hello,
Can anyone provide me with code that will display a message at the beginning of a macro and at the end when it finishes running? Thank You |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying messages
msgbox ("Begin")
msgbox ("End") "Claudia" wrote in message ... Hello, Can anyone provide me with code that will display a message at the beginning of a macro and at the end when it finishes running? Thank You |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying messages
Claudia, try this........
Dim msgentry as String Msgentry= "type your message here" MsgBox msgentry, vbOKOnly, "type the title of the message box here" The vbOkOnly means the message box will only have an ok button to b clicked to move on, you only need to type Dim msgentry as String onc at the top of your code, the rest of it you can use where you like, bu be warned where ever you put it in your code what ever is taking plac up to that box will stop until ok is clicked (useful if your checkin code to see if it works to a certain point!). Hope this helps Simo -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying messages
Claudia,
A MsgBox will stop and wait for the user to click something to dismiss the msgbox and continue the macro. Alternatives include putting a message on the status bar: Application.StatusBar = "Initializing" ..... Application.StatusBar = "Processing record " & RecordNumber .... Application.StatusBar = False ' reset status bar to Excel control Another possibility is to use a modeless UserForm (Excel 2000 and later). In the properties of the UserForm, set ShowModal to False. Now show it. UserForm1.Show The macro will continue running, and can put up other UserForms, MsgBoxes, etc., and can even change the caption of a label in the first UserForm that's been sitting there. Check out www.cpearson.com for the Alerter. You might also be interested in his progress bar. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Claudia" wrote in message ... Hello, Can anyone provide me with code that will display a message at the beginning of a macro and at the end when it finishes running? Thank You |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Msg.box -messages | Excel Discussion (Misc queries) | |||
Displaying Messages | Excel Discussion (Misc queries) | |||
Pop up messages | Excel Programming | |||
Messages not available | Excel Programming | |||
Displaying error messages | Excel Programming |