ich habe versucht, das Makro 175602 einzufuegen, bin aber klaeglich gescheitert. Er legt zwar eine Webseite an, aber diese ist leer... Wo muss ich denn Aenderungen vornehmen???
Vielen Dank
Vielen Dank
Sub HTMListe()
Application.ScreenUpdating = False
Dim strXLS As String
Application.ScreenUpdating = False
strXLS = ActiveWorkbook.FullName
ActiveWindow.SelectedSheets.Copy
ActiveWorkbook.SaveAs Filename:=Left(strXLS, Len(strXLS) - 3) & Format(Time, "h-mm-ss") & ".HTM", _
FileFormat:=xlHtml
ActiveWorkbook.Close
Application.ScreenUpdating = True
End Sub
Vielleicht kannst du ja etwas damit anfangen?
Tschüß
Rolf
das Makro hat in der Tat eine Macke, es geht immer vom aktiven Blatt aus.
Setze nach der Zeile:
For Each wks In ActiveWorkbook.Worksheets
ein:
wks.Select
Dann sollte es funktionieren.
hans
Private Sub CommandButton1_Click()
Dim wks As Worksheet
Dim iRow As Integer, iCol As Integer
Dim sFile As String, sPath As String
sPath = ActiveWorkbook.Path
Close
For Each wks In ActiveWorkbook.Worksheets
wks.Select
sFile = sPath & "\" & wks.Name & ".htm"
iRow = 1
Open sFile For Output As #1
Print #1, ""
Do Until IsEmpty(Cells(iRow, 1))
iCol = 1
Print #1, " "
Do Until IsEmpty(Cells(1, iCol))
If Not IsEmpty(Cells(iRow, iCol)) Then
If iRow = 1 Then
Print #1, " " & Cells(iRow, iCol) & " "
Else
Print #1, " " & Cells(iRow, iCol) & " "
End If
Else
Print #1, " "
End If
iCol = iCol + 1
Loop
Print #1, " "
iRow = iRow + 1
Loop
Print #1, " "
Close
Next wks
MsgBox "Die Dateien wurden im Verzeichnis " & sPath & " gespeichert!"
End Sub
Danke fuer die Hilfe!
Die erweiterte Suchfunktion hilft dir, gezielt die besten Antworten zu finden
Suche nach den besten AntwortenEntdecke unsere meistgeklickten Beiträge in der Google Suche
Top 100 Threads jetzt ansehen