Save File name to a cell specific location

razor_raef

New Member
Joined
Sep 15, 2019
Messages
19
Hey all, i've done searches on this forum without finding much luck as to why my macro isn't working.

I'm trying to have a macro assigned to an object that once hit will save the pre-filled file name (as shown in the example below).

Here is my coding so far:

Sub SaveFile ()
Dim FN As String
FN = Range ("C69").Value
ActiveWorkbook.SaveAs filename:=FN
End Sub

Cell C69 would have something like this:

\\mau.group\corporate\Homefolders$\johnsmith\Desktop\Coaching History\Karen Rose - 15/09/19.xlsm

Thank you to anyone who can figure this one out for me :)
 
All folders must exist & must be named exactly the same as the code.

Can't test this as not on a network, but what if anything does the msgbox say if you run this
Code:
Sub chk()
   MsgBox Dir("\\mau.group\corporate\Homefolders$\johnsmith\Desktop\CoachingHistory", vbDirectory)
End Sub

A popup box appeared in Excel that said "CoachingHistory" and that's it, no file save in the folder.
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Maybe as an alternative solution... What is the macro to have a pop up of the Save As function? So that when the user clicks "Save File" box, it will come up with the save as function to save them going to File>Save As.
 
Upvote 0
Maybe as an alternative solution... What is the macro to have a pop up of the Save As function? So that when the user clicks "Save File" box, it will come up with the save as function to save them going to File>Save As.

Sub SaveAsPopUp()
Application.Dialogs(xlDialogSaveAs).Show
End Sub

Got it :) Thanks everyone.
 
Upvote 0
Glad you sorted it & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
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