LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Recording a 'Save As...'

Dim myFilePath as string
myFilePath = "C:\Documents and Settings\"
myFilePath = myfilepath & Environ("USERNAME")
myFilePath = myfilepath & "\Desktop\"

If you want to save it as a template without macros, I'd save it as a .xltx
file and the fileformat for that is 54. If you want to save as a
template with macros, save as a .xltm file, fileformat 53

HTH,
Barb Reinhardt

"camlad" wrote:

Recording a 'Save As...' I get this:



ActiveWorkbook.SaveAs Filename:= _

"C:\Documents and Settings\FH\Desktop\ Diary.xls", FileFormat:= _

xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _

, CreateBackup:=False



Two questions:



1

The file will be saved as a Template and used on other computers. How can
the code be changed so the file will be saved to the desktop of any
computer.



2

Can the macros be omitted in the saved file? If so what is the code?



Thanks



Camlad



 
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
Recording macro to save file with name change jmcclain Excel Programming 2 February 22nd 07 02:55 PM
How do I make the Stop Recording bar pop up when recording macros J Excel Worksheet Functions 1 January 10th 06 08:46 PM
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: harpscardiff[_10_] Excel Programming 8 November 10th 05 12:24 PM
recording No Name Excel Programming 2 July 29th 04 02:33 PM
Problem- Recording macros for "file save" and "File open" tritaco Excel Programming 1 April 22nd 04 06:15 PM


All times are GMT +1. The time now is 06:59 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"