Save As command
Hello all,
I was wondering if it is possible to create a macro which would save changes to the existing excel file and at the same time save a copy of this file as HTML format in the same location as the excel file. Every time it is run it needs to overwrite the old files (.xls and .htm) with the new changes but keep the filenames the same. If anyone has any ideas please help me out. Thank you in advance. Nikita |
Save As command
sName = thisworkbook.Fullname
On Error Resume Next kill left(sName,len(sName)-1) & "htm" ' or "html" On Error goto 0 thisworkbook.Save thisworkbook.SaveAs Filename := left(sName,len(sName)-1) & "htm", _ FileFormat = xlHtm ThisWorkbook.Close SaveChange:=False Maybe something like the above will work. -- Regards, Tom Ogilvy "Nikita" wrote in message ... Hello all, I was wondering if it is possible to create a macro which would save changes to the existing excel file and at the same time save a copy of this file as HTML format in the same location as the excel file. Every time it is run it needs to overwrite the old files (.xls and .htm) with the new changes but keep the filenames the same. If anyone has any ideas please help me out. Thank you in advance. Nikita |
All times are GMT +1. The time now is 02:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com