How to save an Excel file with the week number in it.

I cannot find the answer to this.
Here is my code;
ActiveWorkbook.SaveAs FileName:="W:\@WIPs Updates\32-Update " & "Week " & Format(Now, "yyyy-mm-dd"), FileFormat:=xlOpenXMLWorkbook

I want the file name to be "32-Update Week 20"...I do not know how to change the format part.
Thanks
Jimi
Jimi ShermanAsked:
Who is Participating?
 
Martin LissOlder than dirtCommented:
ActiveWorkbook.SaveAs FileName:="W:\@WIPs Updates\32-Update " & "Week " & WorksheetFunction.WeekNum(now(), 1), FileFormat:=xlOpenXMLWorkbook
0
 
Wayne Taylor (webtubbs)Commented:
You can also get the week with the Format function by stipulating a format of "ww"....

ActiveWorkbook.SaveAs FileName:="W:\@WIPs Updates\32-Update " & "Week " & Format(Now, "ww"), FileFormat:=xlOpenXMLWorkbook
0
 
Jimi ShermanAuthor Commented:
Thanks
0
 
Jimi ShermanAuthor Commented:
Hey Guys thanks for the answers I gave to points to Martin due to he answered first and it works.
Wayne your answer was VERY easy...did not know it could be that simple!
Thanks to you both.
Jimi
0
 
Martin LissOlder than dirtCommented:
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.