kemperohlmeyer
Board Regular
- Joined
- Oct 4, 2006
- Messages
- 73
Can someone please help me modify this code (below) so that it exports each sheet within the workbook as an html file. The code i am attaching works fine, but only exports ranges from a pre-defined list. I need it to just go sheet by sheet and publish as a webpage.
Thanks,
ko
Sub SaveAsWebPage()
' A macro that saves the pre-defined area as a webpage
' Created by Kemper Ohlmeyer
For Each c In Range("List4")
Range("A3").Value = c.Value
Calculate
Set FileName = Range("d1")
Range("A1:T44").Select
With ActiveWorkbook.PublishObjects("08 - Snapshot info - current managers_7205")
.HtmlType = xlHtmlStatic
.FileName = FileName
.Publish (True)
.AutoRepublish = True
End With
ChDir "P:\Portfolio Mgmt - Due Diligence\WG new\Coded Spreadsheet Templates\Snapshot"
Next c
End Sub
Thanks,
ko
Sub SaveAsWebPage()
' A macro that saves the pre-defined area as a webpage
' Created by Kemper Ohlmeyer
For Each c In Range("List4")
Range("A3").Value = c.Value
Calculate
Set FileName = Range("d1")
Range("A1:T44").Select
With ActiveWorkbook.PublishObjects("08 - Snapshot info - current managers_7205")
.HtmlType = xlHtmlStatic
.FileName = FileName
.Publish (True)
.AutoRepublish = True
End With
ChDir "P:\Portfolio Mgmt - Due Diligence\WG new\Coded Spreadsheet Templates\Snapshot"
Next c
End Sub