Saves the worksheet range "$A$1:$B$11" as a Web page without interactivity so that it can be viewed in any current browser:
Public Sub SaveRangeWeb()
ActiveWorkbook.PublishObjects.Add _
SourceType:=xlSourceRange, _
Filename:=ActiveWorkbook.Path & "\Sample1.htm", _
Sheet:=ActiveSheet.name, _
Source:="$A$1:$B$11", _
HtmlType:=xlHtmlStatic
ActiveWorkbook.PublishObjects(1).Publish (True)
End Sub
Related examples in the same category