Zellbereich als HTLM-Datei abspeichern
13.03.2006 09:58:04
detleffranz
ich möchte von meinem Tabellenblatt (Tabelle1)
den Bereich A100:D3115 in eine HTLM-Datei (Daten) abspeichern.
Mit dem unten aufgeführten Code, bekomme ich die Fehlermeldung
Typen unverträglich. Hat jemand eine Idee ?
Gruss Detlef
Sub HTLMDatei()
Dim iRow As Integer
Dim sTxt As String, sFile As String
Application.ScreenUpdating = False
sFile = Application.DefaultFilePath & "Daten.html"
Open sFile For Output As #1
Print #1, "<html><head>"
Print #1, "</head>"
Print #1, "<body>"
Print #1, Range(Cells(100, 1), Cells(3115, 4)).Value
Print #1, "</body></html>"
Close
Shell "explorer " & sFile, vbNormalFocus
Application.ScreenUpdating = True
End Sub