Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save as Command Line | Excel Discussion (Misc queries) | |||
Excel save command | Excel Discussion (Misc queries) | |||
Worksheets with OFFSET command always ask if I want to SAVE | Excel Worksheet Functions | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
Command Button Prompt Save As? | Excel Discussion (Misc queries) |