+ Reply to Thread
Results 1 to 6 of 6

Save as using multiple Cells

Hybrid View

mille1sj Save as using multiple Cells 03-30-2012, 11:46 AM
dilipandey Re: Save as using multiple... 03-30-2012, 12:53 PM
mille1sj Re: Save as using multiple... 03-30-2012, 01:29 PM
dilipandey Re: Save as using multiple... 03-31-2012, 02:38 AM
mille1sj Re: Save as using multiple... 04-11-2012, 11:09 AM
dilipandey Re: Save as using multiple... 04-11-2012, 01:13 PM
  1. #1
    Registered User
    Join Date
    07-20-2011
    Location
    Detroit, MI
    MS-Off Ver
    Excel 2003
    Posts
    19

    Save as using multiple Cells

    Hi Everyone,

    I have created a form that all of our project managers will be using each month to report data. I would like to know if anyone knows of a way to create a standard file name based on specific cells. I want all of the files to be saved in the following format Name_Project_ProjectNumber_Date.xlsm

    the information is in cells B5_B4_L3_R3

    Thanks, everyone has been very helpful with my past questions.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Save as using multiple Cells

    Hi mille1sj,


    I see a VBA (macro) solution to this query... would that be fine with project managers or they want to save it manually every time ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    07-20-2011
    Location
    Detroit, MI
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Save as using multiple Cells

    I think a macro would be fine, it would help to standardize the file names.

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Save as using multiple Cells

    Hi mille1sj,

    Enter following code in the workbooks for each manager and edit the Note in the code:-

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    
    Application.DisplayAlerts = False
    Application.ScreenUpdating = False
    'Note:- here I am using cell IV1 for some combining texts for workbook name, if required choose other cell
    Range("iv1").Formula = "=b5&""_""&b4&""_""&l3&""_""&TEXT(R3,""dd-mmm-yy"")"
    Range("iv1").Select
    i = ActiveCell.Value
    ChDir "C:\Users\DILIPandey\Desktop" 'Note:- change the path as per your preference
    ActiveWorkbook.SaveAs Filename:=i, FileFormat:=xlOpenXMLWorkbookMacroEnabled  
    
    'Note: remove code line FileFormat ...Enabled portion from above line if you face any issue with Excel 2003.
    
    Application.DisplayAlerts = True
    Application.ScreenUpdating = True
    
    End Sub
    How to add:-
    open workbook, press Alt + F11, locate your workbook in left window, double click on "This workbook" and paste above code

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Last edited by dilipandey; 03-31-2012 at 02:40 AM. Reason: Excel 2003 compatibility issue highlighted

  5. #5
    Registered User
    Join Date
    07-20-2011
    Location
    Detroit, MI
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Save as using multiple Cells

    It works great! is ther a way to show the Save As box? I would like to show this in the event that they need to change the location slightly or change the file name?

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Save as using multiple Cells

    you are welcome mille1sj,

    to change the path, they can edit following part of the code:-
    ChDir "C:\Users\DILIPandey\Desktop" 'Note:- change the path as per your preference

    Else,
    they can remove the above line as well

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1