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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

goldfish

Well-known Member
Joined
Aug 23, 2005
Messages
712
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
 

smokenack

Active Member
Joined
Dec 12, 2003
Messages
351
Thanks for pointing me in the right direction Goldfish
Code:
Filename:=Range("F15").Text & ".xls"

did it.

Much appreciated

Nick
 

Forum statistics

Threads
1,181,649
Messages
5,931,216
Members
436,784
Latest member
amuljono

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
Top