Home |
Search |
Today's Posts |
#2
![]() |
|||
|
|||
![]()
Jim
Sub Make_New_Books() Dim w As Worksheet Application.ScreenUpdating = False Application.DisplayAlerts = False For Each w In ActiveWorkbook.Worksheets w.Copy ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & w.Name, _ FileFormat:=xlHtml ActiveWorkbook.Close Next w Application.DisplayAlerts = True Application.ScreenUpdating = True End Sub Gord Dibben Excel MVP On Fri, 1 Apr 2005 14:51:02 -0800, "Jim in Montana" wrote: I get periodic Excel files with worksheets.. one for each department for instance. What I'd like to do is write some code that will create a separate HTML file for each worksheet. Best scenario would be to name each html file as the worksheet name. Example: file1.xls worksheet1 worksheet2 worksheet3 Run Code which will produce: worksheet1.html worksheet2.html worksheet3.html Any ideas or suggestions? Would be greatly appreciated! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Make Change Case in Excel a format rather than formula | Excel Worksheet Functions | |||
Error trapped only while stepping through the code - Not triggered when run | Excel Discussion (Misc queries) | |||
Opening a file with code without a set file name | Excel Discussion (Misc queries) | |||
Opening a file with code without a set file name | Excel Discussion (Misc queries) | |||
Error trapped only while stepping through the code - Not triggered when run | Excel Discussion (Misc queries) |