Msgbox without OK button

NextYearSox

Active Member
Joined
Oct 24, 2003
Messages
287
Is there a way to print information during the running of VB without requiring input from the user? Right now, I am using Msgbox, but the program stops until I hit the OK button...
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
You could use the status bar. You can write to the status bar this way:
Code:
Application.StatusBar = "I like Pie"
The only thing to remember is to return control of the bar back to excel at the end of your code like so:
Code:
Application.StatusBar = False
 
Upvote 0
You want something that looks like a MsgBox--that's a UserForm

What I do for my projects is create a UserForm that has one label, say it's called UserForm_General. I give it a default caption (eg, "Working...") and a default label (eg, "...please wait"). Then, if I want to display it, and maybe modify the text it displays, I use the following code in the routine that is doing the work. So, say you're opening the workbook, you might put the following in your Private Sub Workbook_Open():


With UserForm_General
.Caption = "Initializing workbook..."
.Show vbModeless
.Repaint
End With

Then when you're done simply issue a:

UserForm_General.Hide


That's it...
 
Upvote 0

Forum statistics

Threads
1,223,626
Messages
6,173,415
Members
452,514
Latest member
cjkelly15

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top