modifing code

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
 

Some videos you may like

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Watch MrExcel Video

Forum statistics

Threads
1,113,849
Messages
5,544,645
Members
410,627
Latest member
georgealice
Top