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

using cell names save

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Using cell names to save a document via macro

Using cell names to save a document via macro

ResolvedVersion 2007

John has attended:
Excel Advanced course

Using cell names to save a document via macro

I wanted to know how I create a macro where I can use 2 (or more) cells to name the excel workbook, using a Macro.

I.e. At work I am required to save a document for each supplier; and the file must ideally be saved as follows:

"supplier name_Date of Workbook_Division"

However, this information would already be entered in the workbook.

Thanks

RE: Using cell names to save a document via macro

Hi John, thanks for your query. That will be tricky to pull off using macros alone; you're going to need some code to do it. You'll need to concatenate the values in the cells together, remembering to add the appropriate ".xls" file extension. Then use

Activeworkbook.saveas filename:= Sheets("MySheet").Range("c1").value

...changing the locations to fit.

Hope this helps,

Anthony

RE: Using cell names to save a document via macro

Hi Anthony,

My apologies; yes I realised that it will require code and not Macro alone.

I'm not sure what you mean by adding the appropriate '.xls' file extension. The workbook would save in Macro-enable workbook anyway, would it not?

Is there a chance I could send the workbook to you? As I have genuinely tried working this out for some time using my own code[s], and have not got very far with it.

Thanks,

John.

 

Training courses

Training information:

See also:

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:

Applying and removing border from cell in Excel 2010

Did you know the shortcut key for applying and removing the outline border for a cell?

CTRL+SHIFT+& Applies the outline border to the selected cells.
CTRL+SHIFT_ Removes the outline border from the selected cells.

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