Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Save as HTML


Hello all! I’m running into some problems with a spreadsheet I’m making
I’m also fairly new to Excel, so I have no idea how to fix them. Now
the big goal right now is to get a spreadsheet I’ve made to save itsel
automatically as an HTML file whenever the worksheet is save
conventionally with ctrl+s or file-save, etc. I currently have th
following code, the first in a module, the second in the ThisWorkboo
file.

Sub ExportAsHTML()

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"T:\Dan Youngren\System\EngineeringHealthGauges.htm" _
, FileFormat:=xlHtml, ReadOnlyRecommended:=False
CreateBackup:=False
Application.DisplayAlerts = True
End Sub



Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel A
Boolean)

Application.DisplayAlerts = False
Application.Run ("ExportAsHTML")
Application.DisplayAlerts = True

End Sub


Now, whenever I save, excel crashes and the changes are lost. Anyon
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 base
on changes to some sort of source cell in the worksheet. That is, I’
like titles and other text boxes to change when some cell in th
worksheet does. Also, can I hide rows and still have they data the
actually contain be graphed? Or should I just cover them up with a
enormous white-filled text box

--
Danimagu
-----------------------------------------------------------------------
Danimagus's Profile: http://www.excelforum.com/member.php...fo&userid=2389
View this thread: http://www.excelforum.com/showthread.php?threadid=37635

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Save as HTML

Try changing your second line

From: Application.Run ("ExportAsHTML")
To: Call ExportAsHTML

HTH

"Danimagus" wrote:


Hello all! Im running into some problems with a spreadsheet Im making.
Im also fairly new to Excel, so I have no idea how to fix them. Now,
the big goal right now is to get a spreadsheet Ive made to save itself
automatically as an HTML file whenever the worksheet is saved
conventionally with ctrl+s or file-save, etc. I currently have the
following code, the first in a module, the second in the ThisWorkbook
file.

Sub ExportAsHTML()

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
"T:\Dan Youngren\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
Application.Run ("ExportAsHTML")
Application.DisplayAlerts = True

End Sub


Now, whenever I save, excel crashes and the changes are lost. Anyone
know how to fix my code or just get it to do what I want?

Also, Ive also been wanting to put text in charts that changes based
on changes to some sort of source cell in the worksheet. That is, Id
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?


--
Danimagus
------------------------------------------------------------------------
Danimagus's Profile: http://www.excelforum.com/member.php...o&userid=23894
View this thread: http://www.excelforum.com/showthread...hreadid=376356


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Save as HTML


Hm, it's still crashing. It's saving the html, though... That'
certianly an improvement. I ran the ExportAsHTML macro, and it run
just fine without crashing. So, it must be something with the code fro
ThisWorkbook, right

--
DanimagusPosted from http://www.pcreview.co.uk/ newsgroup acces

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
save as html unhide all columns[_2_] Excel Discussion (Misc queries) 0 April 26th 10 02:19 AM
Save Workbook as HTML sjwopg Excel Discussion (Misc queries) 0 January 6th 10 08:25 PM
Save as HTML oddity c Excel Worksheet Functions 2 August 5th 05 02:55 AM
cells not right when save as html Scott Excel Discussion (Misc queries) 0 February 23rd 05 01:59 PM
save as html writenick Excel Discussion (Misc queries) 0 January 13th 05 05:25 PM


All times are GMT +1. The time now is 12:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"