Sub ExportAsHTML()
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"T:\...\System\EngineeringHealthGauges.htm" _
, FileFormat:=xlHtml, ReadOnlyRecommended:=False, CreateBackup:=False
Application.DisplayAlerts = True
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Application.DisplayAlerts = False
Call ExportAsHTML
Application.DisplayAlerts = True
End Sub
Now, whenever I save, excel crashes and the changes are lost, though it does export. I figure that because I can run the ExportAsHTML macro without ill effects, I'm doing something wrong with the ThisWorkbook file. Does anyone know how to fix my code or just get it to do what I want?
Also, I’ve also been wanting to put text in charts that changes based on changes to some sort of source cell in the worksheet. That is, I’d like titles and other text boxes to change when some cell in the worksheet does. Also, can I hide rows and still have they data they actually contain be graphed? Or should I just cover them up with an enormous white-filled text box?
Edited by Danimagus, 06 June 2005 - 12:57 PM.