save as and open

ladbroke

Board Regular
Joined
Jun 2, 2006
Messages
170
What id like to do is to have an command button on a userform which once clicked, opened up the save as function.

Id like another command button that also opens up the open file function.

can someone please help with a formula for these two?
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
to display saveas;

application.getsaveasfilename

to display open function;

application.getopenfilename
 

ladbroke

Board Regular
Joined
Jun 2, 2006
Messages
170
i cant seem to get these to work..

i want to use command buttons.. how do i write them into the formula?
 

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
i cant seem to get these to work..

i want to use command buttons.. how do i write them into the formula?
when you are using a command buttons, you're doing a macro program isn't it? so something like;

Code:
Private Sub CommandButton1_Click()
Application.GetSaveAsFilename
End Sub
Private Sub CommandButton2_Click()
Application.GetOpenFilename
End Sub
 

Forum statistics

Threads
1,136,268
Messages
5,674,734
Members
419,523
Latest member
Urnovio

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
Top