VBA to Open and SaveAs

AndrewKent

Well-known Member
Joined
Jul 26, 2006
Messages
889
Hi there folks,

I need to build two VBA routines that when activated will...

1) open the OPEN dialog box and allow the user to open an Excel file of their choice.

...and...

2) open the Save As dialog box and allow the user to save an Excel file to a location of their choice.

...be damned if I can't remember the code to bring up these dialog boxes!

Many thanks,

Andy
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try:

Application.Dialogs(xlDialogOpen).Show

Application.Dialogs(xlDialogSaveAs).Show

HTH

Jon
 
Upvote 0
Andy

Perhaps Application.GetOpenFileName/GetSaveAsFileName.
 
Upvote 0
Following on from this,

How easy is it to add in coding so that when

Application.Dialogs(xlDialogSaveAs).Show

is used, a potential file name (defined by my coding) is populated into the filename box?
 
Upvote 0

Forum statistics

Threads
1,213,535
Messages
6,114,192
Members
448,554
Latest member
Gleisner2

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