Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Publishing a Range
I hope someone cvan help me. Below is some code that I am trying to get to
work but no luck. Sub Pub_Chart_To_Web() Dim myWebPage as Range Sheets("Sheet1").Select Set myWebpage = Range("Part3").Value Sheets("Chart").Select Application.Run "A_ChartLinks_FormatFix" Range("Chart_PubToWeb").Select With ActiveWorkBook.PublishObjects.Add( _ SourceType:=xlSourceRange, _ Filename:=myWebpage, _ Sheet:="Chart", _ Source:="Chart_PubToWeb", _ HtmlType:=xlHtmlStatic).Publish(True) End With End Sub Part3 is a named range on Sheet1 = "\\mchomek\shane\newchart.mht" (with quote mark). The code above is giving me a expected function error with .Publish highlighted. Thanks, Shane |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Publishing a Range
Assuming that myWebpage is a range object then remove the .value from the
end... Set myWebpage = Range("Part3") -- HTH... Jim Thomlinson "akay26" wrote: I hope someone cvan help me. Below is some code that I am trying to get to work but no luck. Sub Pub_Chart_To_Web() Dim myWebPage as Range Sheets("Sheet1").Select Set myWebpage = Range("Part3").Value Sheets("Chart").Select Application.Run "A_ChartLinks_FormatFix" Range("Chart_PubToWeb").Select With ActiveWorkBook.PublishObjects.Add( _ SourceType:=xlSourceRange, _ Filename:=myWebpage, _ Sheet:="Chart", _ Source:="Chart_PubToWeb", _ HtmlType:=xlHtmlStatic).Publish(True) End With End Sub Part3 is a named range on Sheet1 = "\\mchomek\shane\newchart.mht" (with quote mark). The code above is giving me a expected function error with .Publish highlighted. Thanks, Shane |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Publishing to pdf | New Users to Excel | |||
publishing | Excel Discussion (Misc queries) | |||
Frontpage publishing help please | Excel Discussion (Misc queries) | |||
Posting/publishing to the web | Excel Discussion (Misc queries) | |||
Publishing to web | Excel Worksheet Functions |