browse button for save directory

geospatial

Active Member
Joined
Sep 2, 2008
Messages
290
I am trying to add a button that will get the directory of the location that an individual chooses.
Code:
application.getopenfilename

I know the above code will open your browse window and allow you to choose a file, but all I really want is to be able to open the browse window and then creat a new folder and make that my save directory or choose an already created folder and make it my save directory.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Try like this

Code:
Sub saveme()
Dim fName As Variant
fName = Application.GetSaveAsFilename(InitialFileName:="", FileFilter:="Excel Files (*.XLS), *.XLS", Title:="Save As")
If fName = False Then Exit Sub
ActiveWorkbook.SaveAs Filename:=fName
End Sub
 
Upvote 0
Thanks,

they both seem to work fine. Now that this part is accomplished I have to figure out how to export all charts in a workbook to that folder location.
 
Upvote 0
I probably will. I like to work on things and google for a good period of time before I start a thread.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,719
Members
452,939
Latest member
WCrawford

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