Gruppe
Extern
Problem
Über die erste Schaltfläche soll eine HTML-Datei mit der Anzeige der in Zelle A1 genannten Grafik erstellt werden, die über die zweite Schaltfläche aufgerufen werden kann.
StandardModule: Modul1
Sub CreateHTML()
Dim sPath As String
sPath = Application.Path
Close
Open sPath & "\test.htm" For Output As #1
Print #1, "<html><body>"
Print #1, "<img src=""" & Range("A1").Value & """>"
Print #1, "</body></html>"
Close
End Sub
Sub CallHTML()
Dim appIE As Object
Set appIE = CreateObject("InternetExplorer.Application")
appIE.navigate Application.Path & "\test.htm"
appIE.Visible = True
Set appIE = Nothing
End Sub