save file as cell value.xls

smokenack

Active Member
Joined
Dec 12, 2003
Messages
351
The following portion of code should save the active workbook in a folder named "sent paysheets" and rename it with the date shown in cell F15 on the active sheet
Code:
    ChDir "O:\Supervisors\sent paysheets"
    ActiveWorkbook.SaveAs Filename:=Range("F15").xls, _
         FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
        ReadOnlyRecommended:=False, CreateBackup:=False

run time error 438 object doesn't support this property or method results.

any ideas?

thanks for looking

Nick
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try
Code:
Filename:=Range("F15").value & ".xls"

Since Filename takes a string so for the first part of your string you have Rang.("F15").value and for the later part you have ".xls" and you need to combine the strings with a &.

HTH,
~Gold Fish
 
Upvote 0
Thanks for pointing me in the right direction Goldfish
Code:
Filename:=Range("F15").Text & ".xls"

did it.

Much appreciated

Nick
 
Upvote 0

Forum statistics

Threads
1,224,811
Messages
6,181,081
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