saveasfilenameautogeneratedlook

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

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

resolvedResolved · 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 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:

Shortcuts for working with named ranges in Excel

If you are working with or creating named ranges in your spreadsheets, then you may find the following shortcut keys useful.

- Bring up the Define Names dialogue box on screen by using Ctrl + F3 (instead of going to Insert - Names).

- Create Names from labels you have entered into the spreadsheet by highlighting the labels and related figures, then hold down Shift + Ctrl + F3. You can then choose to create names from the top or bottom rows, or left or right columns.

- Go directly to a named range by hitting the F5 key. The Go To dialogue box will open and display any named ranges in the spreadsheet. Simply select the named range to navigate to it in the spreadsheet.

View all Excel hints and tips


Server loaded in 0.08 secs.