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

Hi!!
When i click on my command buttom
i would like to save the file i'm working in
to a new file, the file name come's from
a variable. "filename"

Can some one help me?

Best regards alvin

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Save file as a new file

activeworkbook.saveas filename:=myFilename, fileformat:=xlworkbooknormal

(I wouldn't use a variable with the name Filename. Filename is used for lots of
parameters within VBA.)

There's another command that you may want:

activeworkbook.savecopyas

(see VBA's help for more info.)

Alvin Hansen wrote:

Hi!!
When i click on my command buttom
i would like to save the file i'm working in
to a new file, the file name come's from
a variable. "filename"

Can some one help me?

Best regards alvin


--

Dave Peterson
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
Excell2003 (SP-1) File > Save and File > Save As.. grayed out Joe Murphy Excel Discussion (Misc queries) 0 March 9th 05 10:00 PM
Office 2003 - "autocomplete" in file | open or file | save no longer works Lanwench [MVP - Exchange] Excel Discussion (Misc queries) 4 January 12th 05 01:35 AM
Excel marcos firing on file save as but not file save Andy Excel Programming 1 August 3rd 04 10:34 AM
Save File to Another Directory, but not change Users File Save location Mike Knight Excel Programming 1 May 28th 04 09:06 PM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


All times are GMT +1. The time now is 09:43 AM.

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"