AW: solange makro läuft uf oder msgbox einblenden
25.08.2005 11:20:13
Peter
Hallo sören,
was hälst du denn von dieser Variante.(ersatzfortschrittsanzeige)
Habe ich mir mit hilfe dieses Forums mal geschriben.
Private objExplorer As Object
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
gruss Peter