Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 "Claus Højlund" wrote: 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? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. "Claus Højlund" wrote: 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? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 "Claus Højlund" wrote in message ... 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? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 "JMB" wrote: 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 "Claus Højlund" wrote: 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? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 "Steve Yandl" wrote: 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 "Claus Højlund" wrote in message ... 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? |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 "Claus Højlund" wrote in message ... 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 "Steve Yandl" wrote: 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 "Claus Højlund" wrote in message ... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
replace VBA run-time error message with custom message | Excel Programming | |||
Replace Excel Message w/Custom Message | Excel Programming | |||
Intercept/replace standard 'cell protected' message with my own message? | Excel Programming | |||
Opening an attachment of a message that has a message as attachmen | Excel Programming | |||
Displaying a message in a message box without requiring user to click anything to proceed | Excel Programming |