save as cell reference to newly created folder

JONESY

Board Regular
Joined
Jul 23, 2004
Messages
63
Hi everyone

I'm trying to make an order pad and I'm having trouble saving.
I want to save the file by an order number reference in a sheet. I want to put that order in a folder by supplier ref. Now I've got the Code to look up and check whether there is a folder based on a cell reference and if not then generate a new folder. But when I try to do the save as command I can't seem to save the file name I want into the newly created folder
to create folder i have
MkDir "C:\My Documents\orders\" & Suppname
but to save filename I using
ActiveWorkbook.SaveAs Filename:="C:\My Documents\orders\" & Suppname & MyName, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=True, CreateBackup:=False
Which is saving the file in the Orders Folder

Sure I'm doing something daft but can't see what
Thanks for the Help
 

Some videos you may like

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

JONESY

Board Regular
Joined
Jul 23, 2004
Messages
63
sorry solved it sometimes that 5 minute cup of tea really does provide all the answers!
 

Watch MrExcel Video

Forum statistics

Threads
1,122,481
Messages
5,596,399
Members
414,063
Latest member
N_Bates

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