A message without the box?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to have a MsgBox without OK or cancel, simply telling what is
going on? I want to use it with a macro that takes a while, so for the user
it would be nice to know that everything is ok and the machine is working
hard and so on. I can't find such a VBA command. Can anyone help?
 
You could put messages into the status bar w/o interrupting code execution
Application.StatusBar = "Sit back and relax"

To reset it when your done:
Application.StatusBar = False
 
I saw some discussion on this the other day and one simple method was to
create a message on a separate sheet (one not used in your main program) and
put that sheet on screen until the code reaches a certain point, then put the
appropriate worksheet back on screen. See the example:

Sub x()
'Start program
'Change to screen with message telling user that processing continues
'run the main body of code
'Chane to screen showing results of processing
'Close program
End Sub

I have not tried it, but it seems simple enough.
 
Here is one option.

____________________________________

On Error Resume Next
Set objExpl = CreateObject("InternetExplorer.Application")
With objExpl
.Navigate "about:blank"
.Toolbar = 0
.StatusBar = 0
.Width = 400
.Height = 100
.Visible = 1
.Document.Title = "Status"
.Document.Body.InnerHTML = "Be patient, subroutine may take a few
minutes"
End With

' Run some code
'For testing, you can skip the two lines below and manually quit IE.

objExpl.Quit
Set objExpl = Nothing
_____________________________________

Steve
 
Hi JMB
The code works fine. The message is not that big, so I think a lot of my
students would miss it. But thanks a lot for your proposal.
CLaus
 
Thanks a lot. Just what I was looking for. I had to add this line:
Dim objExpl As Object
But now it works fine.
Again thanks a lot
Claus
 
You're welcome.

The one time I used this myself, I had the InnerHTML text change at
different points during code execution and that worked just fine.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top