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