Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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 Command Line SoDakRah Excel Discussion (Misc queries) 1 July 29th 08 06:12 PM
Excel save command Teddy Excel Discussion (Misc queries) 2 September 14th 07 08:34 PM
Worksheets with OFFSET command always ask if I want to SAVE Jolly good Delaware lad Excel Worksheet Functions 2 April 1st 07 08:40 PM
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
Command Button Prompt Save As? Rich Excel Discussion (Misc queries) 3 May 17th 06 02:33 PM


All times are GMT +1. The time now is 07:20 PM.

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

About Us

"It's about Microsoft Excel"