Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I display a Please Wait message ? 1

Status
Not open for further replies.

Siggy19

Technical User
Jan 6, 2003
141
0
0
US
I know this is dumb.

I want to display a "Please wait" message in the middle of the screen while saving a big document in Excel. When the save is finished, I want the message to vanish without any intervention by the user.

How do I do this ??? MsgBox demands a response and when I try putting a label in a seperate window, with the save in the newwindow.Activate event, it does not display the label !
 
What I do is create a little internet explorer window with a DivObject to display a statuswindow. Maybe you can try it...


Please tell me if I'm wrong I like to learn from my mistakes...
_____________________________________
Feed a man a fish and feed him for a day.
Teach a man to fish and feed him for a lifetime...
 
try this... I use it in vbscript most of the time, but one day it came in handy in a vbtool also...

This is an example...
Code:
Option Explicit
Private oIE As Object, oDiv As Object
Const strFile = "C:\Status.html"

Private Sub Form_Load()
    CreateOutput
    oDiv.InnerHTML = "This is a statuswindow..."
End Sub

Private Sub CreateOutput()
    Dim oFSO As Object, oFile As Object
    Const ForWriting = 2
        
    Set oIE = CreateObject("InternetExplorer.Application")
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    Set oFile = oFSO.OpenTextFile(strFile, ForWriting, True)
    oFile.WriteLine ("<HTML><HEAD><TITLE>" & App.EXEName & " Status Window</TITLE></HEAD>")
    oFile.WriteLine ("<BODY SCROLL='NO'><CENTER><FONT FACE='arial black'> <HR COLOR='BLACK'>")
    oFile.WriteLine ("<DIV id='DivObject'></DIV>")
    oFile.WriteLine ("<HR COLOR='BLACK'></FONT></CENTER></BODY></HTML>")
    oFile.Close
    
    oIE.Navigate strFile
    oIE.ToolBar = False
    oIE.StatusBar = False
    oIE.Resizable = False
    Do
    Loop While oIE.Busy
    oIE.Width = 500
    oIE.Height = 150
    oIE.Left = 50
    oIE.Top = 50
    oIE.Visible = True
    Set oDiv = oIE.Document.All("DivObject")
End Sub

Please tell me if I'm wrong I like to learn from my mistakes...
_____________________________________
Feed a man a fish and feed him for a day.
Teach a man to fish and feed him for a lifetime...
 
Seems a bit longwinded to me.
All I do is show a suitably formatted textbox (from Drawing toolbar) and delete it when done.


Regards
BrianB
Use CupOfCoffee to speed up all windows applications.
It is easy until you know how.
================================
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top