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

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
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,214,976
Messages
6,122,539
Members
449,088
Latest member
RandomExceller01

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