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
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,214,971
Messages
6,122,525
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top