SaveAs to a network folder

fringehead21

New Member
Joined
Jul 20, 2011
Messages
5
I have a macro the I use to sign and date an Excel form in Excel 2010. I would like to add functionality to the macro that will open the SaveAs dialog box with a perticular folder location on the network already selected so all I have to do is enter the file name I want it to be and click the save button.

Thank you in advance for any help given.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi welcome to the board!!

Code:
x = Application.GetSaveAsFilename("[URL="file://servername/path/"]\\servername\path\[/URL]")
 
Upvote 0
Well I spoke to soon. The SaveAs does open, but I can't save the file. I beleive that its due to the file type selection being "All Files" with no other choices.
How can I fix this issue.
 
Upvote 0
Just add the rest of the parameters you need:

Code:
x = Application.GetSaveAsFilename("[URL="file://\\server\path\"]\\server\path\[/URL]", "Excel Files (*.xls;*.xlsx), *.xls;*.xlsx")
If x <> False then ActiveWorkbook.SaveAs x
 
Upvote 0
Thank you, that works great.

Since I'm on the topic. For future referance, if I wanted to specify a specific file type would I change the text in red of the statment below to the prefered file type?

x = Application.GetSaveAsFilename("\\server\path\", "Excel Files (*.xls;*.xlsx), *.xls;*.xlsx")
If x <> False then ActiveWorkbook.SaveAs x
 
Upvote 0
Yes, and if necessary you may want to change the description from Excel Files to whatever you need.
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,752
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top