Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 276
Default Application.DefaultFilePath to open not just save

I am currently using the below code to set the default save path but i want
to have is, the Default file path folder opened so the user can navigate to
a Sub Folder, then save it.


Sub Macro2()
' Saves and Quits Excel
Application.DefaultFilePath = ("\\Office2\my documents\Cure Sheets")
res = InputBox("Enter the Splice Number....", "Company Name...")
If res = "" Then Exit Sub
With ActiveWorkbook
ActiveWorkbook.Save
End With
With ActiveWorkbook
ActiveWorkbook.SaveAs Filename:=res
On Error GoTo 0
End With
Application.DisplayAlerts = False
Application.Quit
End Sub


How can i do this ?


Regards

Corey


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 276
Default Application.DefaultFilePath to open not just save

Forgot to mention.
I have the main file as a Template.
How do i set the other files to SaveAs .xls and Not as Templates?

Corey....


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Application.DefaultFilePath to open not just save

Corey,
Have you tried:
ChDir "C:\"
RetVal= Application.GetSaveasFilename()

NickHK

"Corey" wrote in message
...
I am currently using the below code to set the default save path but i

want
to have is, the Default file path folder opened so the user can navigate

to
a Sub Folder, then save it.


Sub Macro2()
' Saves and Quits Excel
Application.DefaultFilePath = ("\\Office2\my documents\Cure Sheets")
res = InputBox("Enter the Splice Number....", "Company Name...")
If res = "" Then Exit Sub
With ActiveWorkbook
ActiveWorkbook.Save
End With
With ActiveWorkbook
ActiveWorkbook.SaveAs Filename:=res
On Error GoTo 0
End With
Application.DisplayAlerts = False
Application.Quit
End Sub


How can i do this ?


Regards

Corey




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
Spreadsheet will not open without Excel Application being open fir Deirdre Lysaght Excel Discussion (Misc queries) 1 November 13th 07 04:11 PM
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
Can Excel open a new application every time you open a file? shoon Setting up and Configuration of Excel 0 December 13th 05 03:28 PM
Can not open excel files without open application Taarfa Excel Discussion (Misc queries) 3 July 9th 05 11:56 PM
Problems setting Application.DefaultFilePath paulojfonseca Excel Programming 1 July 6th 05 11:24 PM


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