wie kriegt man das hin, dass solange makros bzw. einige prozeduren ablaufen, ein uf oder eine msgbox ("Bitte warten...") eingeblendet wird, das/die sich nach abschluss der makros automatisch schließt?
kann mir jemand helfen?
gruß,
sören
Sub test()
userform1.show
'hier jetzt Deine Makroanweisungen rein
userform1.hide
End Sub
Sub Ok_Click()
call makro 1
call makro 2
call makro 3
End Sub
Sub speichernhtml()
Dim FileName$
Dim Farbe1
Dim Farbe2
Dim Farbe3
Dim name
Dim text
Dim datum As Date
FileName = "C:/Dummi" & ".html"
Farbe1 = "#00ffff"
Farbe2 = "#0000ff"
Farbe3 = "#ff0000"
'Farbe2 = "#000000"
name = Application.UserName
Close #1
Open FileName For Output As 1
Print #1, "<html>"
Print #1, "<meta name=""author"" content =""Peter"">"
Print #1, "<meta name=""Date"" content = "; " " & datum; " "; " >"
Print #1, "<meta name=""keywords"" content=""HTML,Meta-Information,Peter's Add-In"">"
Print #1, "<TITLE>Peter.Guttke</TITLE>"
Print #1, " Angemeldet als:" & " " & name
Print #1, "<body ; BGColor = " & Farbe1 & "; text = " & Farbe2 & " > """
Print #1, "<FONT COLOR = " & Farbe3 & " > """
Print #1, "<Font SIZE="" +4"" > "
Print #1, "<marquee>Bitte warten ... </marquee>"
Print #1, "</body></html>"
Close #1
End Sub
Sub öffnenhtml()
'Dim objExplorer As Object
Dim varFile As Variant
Set objExplorer = CreateObject("InternetExplorer.Application")
varFile = "C:\Dummi.html"
With objExplorer
.Navigate varFile
.StatusBar = False
.MenuBar = False
.Toolbar = False
.Visible = True
'.Resizable = False
.Offline = False
.Width = 280
.Height = 120
End With
End Sub
Sub schliessenhtml()
On Error GoTo ErrorHandler
objExplorer.Quit
Set objExplorer = Nothing
Exit Sub
ErrorHandler:
MsgBox "Sie haben den Explorer schon geschlossen?"
End Sub
Sub löschenhtml()
strPfad = "C:"
sname = "Dummi.html"
Kill strPfad & "\" & sname
End Sub
Sub Start()
Call speichernhtml
Call öffnenhtml
Call hier dein Macro rein
Call schliessenhtml
Call löschenhtml
End Sub