98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Saveasfilename...auto-generated..look into sheet at given cell..
Saveasfilename...auto-generated..look into sheet at given cell..
Resolved · Low Priority · Version 2007
Ludovic has attended:
Excel Intermediate course
Saveasfilename...auto-generated..look into sheet at given cell..
There is a macro I run every week. It uses a template, fills it in with new data, and I want it to then save this new data as a new document under the heading GaS UK wk no x. x this week being week 1, next week, wk 2, and so on.
I believe the code is smth like this:
ActiveWorkbook.SaveAs Filename:=GaS%20UK%20wk + week_no + .xls",
Somewhere in the macro I will have to define what week_no is.
I could do it by having it as reading week_no = cell F5
How would I go about doing that in code, and where would I put it. Presumably the code goes above the ActiveWorkbook.SaveAs Filename..comand
(Another way it could be done is by somehow translating the date I enter into the macro itself.
At the very top there's
day_date1 = Day.Value + "/" + Month.Value + "/" +YearFigure.Value
desired_path = Day.Value + Month.Value + YearFigure.Value
I suppose I could somehow translate that into a week number which could be used to save the file name...???)
Whichever is easier, help is much appreciated!
RE: Saveasfilename...auto-generated..look into sheet at given ce
Hi Ludovic
Thanks for your post I have emailed you directly with further information.
Regards
Jacob
Tue 2 Feb 2010: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Shortcuts for working with named ranges in ExcelIf you are working with or creating named ranges in your spreadsheets, then you may find the following shortcut keys useful. |