SaveAs Macro not saving anything

Melynnie

New Member
Joined
Nov 30, 2011
Messages
6
I am hoping that someone can tell me what I am missing - I have this macro and everything works just fine except that it doesn't actually SAVE anything - just goes through the motions... Here is what I have -


Sub getFolder()
Dim filepath As String
Dim newFldrDia As FileDialog
Dim filename1 As String
Dim selectedFolder As String




filename1 = Range("c4").Text
Set newFldrDia = Application.FileDialog(msoFileDialogSaveAs)









With newFldrDia
.Title = "Vendor Adjustments"
.InitialFileName = "S:\Melynnie\Adjustment Backups"
.InitialFileName = "TYPE YOUR PO NUMBER HERE"
.AllowMultiSelect = False
.Show


Application.DisplayAlerts = True

selectedFolder = filename1 & (" - BE SURE TO PRINT ANY CORRESPONDING EMAILS")


End With

MsgBox selectedFolder


End Sub
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
I am hoping that someone can tell me what I am missing
You're not telling it to save. ;)
Also, you're asking for a filename, but never using it.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,154
Members
453,021
Latest member
Justyna P

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