View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mark Ivey Mark Ivey is offline
external usenet poster
 
Posts: 120
Default code to save as webpage

Give this one a try:

'---------------------------------------------------------------------------------------
' Module : SaveAsHTML
' DateTime : 6/19/2007 22:34
' Author : Mark Ivey - Modification from Dave Hawley's SaveAsPrompt
Module @
' http://www.ozgrid.com/forum/showthread.php?p=312642
' Purpose : To automatically save a file as an HTML Webpage (without
overwrite prompt)
'---------------------------------------------------------------------------------------

Sub SaveAsHTML()
Dim StrSave As String
'Change the path and filename as desired
StrSave = "C:\MyFile2"

If StrSave = "False" Then
Exit Sub
Else
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs StrSave, FileFormat:=xlHtml
Application.DisplayAlerts = True
End If
End Sub









"Ryan" wrote in message
ps.com...
is there a way to have code run in a macro to automatically save a
chart / or workbook as a webpage?

Thanks!

Ryan