Excel VBA Save As

shapeshiftingkiwi

New Member
Joined
Mar 31, 2021
Messages
33
Office Version
  1. 365
Platform
  1. Windows
I'm trying to create a save as button in excel and adapted the below code from a video guide. However whenever I click on the button or hit the code to run, nothing happens. The macro is linked to the button and the button does "depress" to show it was clicked. What am I missing?

Sub Save_As()
With Application.FileDialog(msoFileDialogSaveAs)
.Title = "Save"
.ButtonName = "Save Form"
.InitialFileName = "C:\Users\MYNAME\OneDrive - MY COMPANY\Documents\Excel\" & Range("M3").Value
End With
End Sub
 

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.
This one could be marked as solved then, so that others don't waste time looking for threads that need a solution?
Thanks & glad to have been of some help.
 
Upvote 0
Interesting that you marked your own post as the solution. Oh well, it's not like I missed out on any $$. ;)
 
Upvote 0
Lol! My bad, got confused by the merged thread and figured something had to be marked as solved. Don't yell at me, Micron!
 
Upvote 0

Forum statistics

Threads
1,215,510
Messages
6,125,234
Members
449,216
Latest member
biglake87

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