Article ID: 178861
Article Last Modified on 6/23/2005
A1 : 2
A2 : 4
A3 : 6
A4 : 8
A5 : 10
A6 :
A7 : This
A8 : is
A9 : a
A10: test
Microsoft Office 98:Office:Excel Add-ins
Sub CreateWebPage()
Dim ObjToConvert(2) As Variant
Dim Result As Integer
' Populate the ObjToConvert array with the ranges and chart
' that you want to export.
Set ObjToConvert(0) = Sheets("sheet1").Range("a1:a5")
Set ObjToConvert(1) = Sheets("sheet1").ChartObjects("Chart 1")
Set ObjToConvert(2) = Sheets("sheet1").Range("a7:a10")
' Create the HTML page.
Result = htmlconvert(rangeandcharttoconvert:=ObjToConvert, _
useexistingfile:=False, _
usefrontpageforexistingfile:=False, _
addtofrontpageweb:=False, codepage:=1252, _
htmlfilepath:="Test.htm", _
headerfullpage:="Test Page", _
linebeforetablefullpage:=True, _
namefullpage:="MyName")
' If the conversion is successful, the code htmlconvert_success
' is returned.
If Result = htmlconvert_success Then
MsgBox "Web Page Created Successfully"
Else
MsgBox "Error Creating Web Page"
End If
End Sub
Additional query words: XL98
Keywords: kbhowto kbfaq KB178861