PDA

View Full Version : republish sheets to html



chungtinhlak
02-16-2009, 09:43 AM
Hello all,

I have a workbook with 10 different sheets. I have save a master workbook in excel format but also save each sheets separately as htm. I want to be about to republish all sheets at closing so that i can save the changes to the html format also. The sheets that are saved in htm format are name the same as the sheet names.

tried this but doens't work, can someone help me.

Thanks

Sub test()
Dim i As Integer
For i = 1 To 10
With ActiveWorkbook.PublishObjects(Sheets(i))
.HtmlType = xlHtmlStatic
.Publish = (False)
.AutoRepublish = False
End With
End Sub