View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

How about this:

Option Explicit
Sub testme()
Dim wks As Worksheet

For Each wks In ActiveWorkbook.Worksheets
wks.Copy 'to a new workbook
With ActiveSheet
.Parent.SaveAs Filename:="C:\temp\" & .Name & ".htm", _
FileFormat:=xlHtml
.Parent.Close savechanges:=False
End With
Next wks
End Sub

I used the worksheet name and save into a C:\temp folder. Change these to match
your situation.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

wrote:

I have a workbook that has 32 sheets in it. I would like to export each
sheet into its own htm file. Is there a way to do this automatically so
I don't have to go through and export each sheet individually? I do NOT
want to export it as a multi-sheet htm page.

Thanks...
J


--

Dave Peterson