save as and open

ladbroke

Board Regular
Joined
Jun 2, 2006
Messages
175
Office Version
  1. 365
Platform
  1. Windows
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

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

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
175
Office Version
  1. 365
Platform
  1. Windows
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,176,293
Messages
5,902,351
Members
434,967
Latest member
jbgianan

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