vba to save file using reference from cell in sheet

could an expert help me out with the code to save a file using the data in cell C36 to create the name of the file. I also need the vba to save the file in a folder where year will change and month will change, so:

file name is taken from Cell C36 [i.e.Part Red Rec 1234]

Path is:  G:\Cpn\CA\Events\Partial\current\current month\file name

Year is current year [If folder doesn't exist, create it]

Month is Current Month [i.e. Mar 15] ... [If folder doesn't exist, create it]

Result would be Save file as:

G:\Cpn\CA\Events\Partial\2015\Mar 15\Part Red Rec 12345

Manythanks
JagwarmanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rory ArchibaldCommented:
For example:

Sub SaveMe()
Const csROOT_PATH As String = "G:\Cpn\CA\Events\Partial\"

If Dir(csROOT_PATH & Year(Date), vbDirectory) = vbNullString Then
    MkDir csROOT_PATH & Year(Date)
End If
If Dir(csROOT_PATH & Year(Date) & "\" & Format(Date, "mmm yy"), vbDirectory) = vbNullString Then
    MkDir csROOT_PATH & Year(Date) & "\" & Format(Date, "mmm yy")
End If
ActiveWorkbook.SaveAs Filename:=csROOT_PATH & Year(Date) & "\" & Format(Date, "mmm yy") & "\" & ActiveSheet.Range("C36").Value & ".xlsm", FileFormat:=52

End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JagwarmanAuthor Commented:
brilliant thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.