LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Publish active sheet as static web page


This may be rough, but it works:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/1/2005 to publish active sheet and the next sheet
(to right) as web pages.


With ActiveWorkbook.PublishObjects.Add( _
SourceType:=xlSourceRange, _
Filename:="ftp://mysite.com/Current.htm", _
Sheet:=ActiveSheet.Name, _
Source:="A2:I55", _
HtmlType:=xlHtmlStatic)
Publish (True)
AutoRepublish = False
End With

Dim i As Integer
Dim intStart As Integer

intStart = ActiveSheet.Index + 1

For i = intStart To Worksheets.Count
If Not Worksheets(i).Visible = xlHidden Then
'Note: Could add "and Worksheets(i).Visible = xlVeryHidden to above
Worksheets(i).Activate
Exit Sub
End If
Next i

With ActiveWorkbook.PublishObjects.Add( _
SourceType:=xlSourceRange, _
Filename:= "ftp://mysite.com/Next.htm", _
Sheet:=ActiveSheet.Name, _
Source:="A2:I55", _
HtmlType:=xlHtmlStatic)
Publish (True)
AutoRepublish = False
End With
End Sub


--
Stellina
------------------------------------------------------------------------
Stellina's Profile: http://www.excelforum.com/member.php...o&userid=25784
View this thread: http://www.excelforum.com/showthread...hreadid=391868

 
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
publish as web page Hostohio Excel Discussion (Misc queries) 0 January 12th 10 06:47 PM
Automate 'Publish as Web Page'? dyowee Excel Discussion (Misc queries) 2 May 5th 08 01:19 PM
Publish as Wed Page JDH Setting up and Configuration of Excel 0 April 1st 08 03:21 PM
How to add todays date (static) to the current active cell using m JimmyJam75 Excel Discussion (Misc queries) 5 September 6th 06 11:23 AM
publish excel as web page Lakshmi Narayanan Excel Programming 0 February 24th 04 06:44 AM


All times are GMT +1. The time now is 01:23 PM.

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

About Us

"It's about Microsoft Excel"