Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Publishing to pdf Machinist60[_2_] New Users to Excel 1 November 5th 09 02:28 PM
publishing rajesh Excel Discussion (Misc queries) 0 June 3rd 09 07:51 AM
Frontpage publishing help please Jonny2009 Excel Discussion (Misc queries) 1 May 10th 09 07:54 PM
Posting/publishing to the web ynissel Excel Discussion (Misc queries) 0 June 8th 05 03:24 PM
Publishing to web Phil Excel Worksheet Functions 0 November 20th 04 07:20 PM


All times are GMT +1. The time now is 05:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"