Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

saveasfilenameautogeneratedlook

Forum 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..

ResolvedVersion 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 courses

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
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Using Alt in Save Dialog Box

When you are saving (or opening) a file, try these;
(Note the numbers are on the keyboard not the numeric keypad)
1. Go to previous folder Alt+1
2. Go up one folder level Alt+2
3. Search the Web Alt+3
4. Delete selected file Alt+4 or Delete
5. Create a new folder Alt+5
6. Cycle through all views Alt+6 repeatedly
7. Display the Tools menu Alt+7

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.