+ Reply to Thread
Results 1 to 8 of 8

Save As FileName

  1. #1
    Registered User
    Join Date
    12-02-2007
    Posts
    23

    Save As FileName

    Here is my problem.

    If a user selects "save as," I want to pre-populate with a value. The value should come from C2, B2 and A2.

    C2 = systemName
    B2 = string
    A2 = date (user inputed. Format: mm/dd/yyyy Example: 03/11/2008)

    I want the fileName format to be C2_B2_A2.xls

    How can this be accomplished?

    Thanks in advance for any help!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Maybe like this in the ThisWorkbook module:
    Please Login or Register  to view this content.
    A2 = date (user inputed. Format: mm/dd/yyyy Example: 03/11/2008)
    You can't have slashes in filenames.

  3. #3
    Registered User
    Join Date
    12-02-2007
    Posts
    23
    Your code works great.

    Is there a way to prevent this code from being called if one of the cells (A2,B2 or C3) are null (empty)?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Please Login or Register  to view this content.
    returns True if the cell is empty. Can you handle it from there?

  5. #5
    Registered User
    Join Date
    12-02-2007
    Posts
    23
    Sadly I am not a Excel guru, so I cannot handle it from here. I tried adding the code, but it failed.

    If any of the fields (A2, B2, C2) are empty then the default workbook name should be displayed.

    Please Login or Register  to view this content.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Time to start learning:
    Please Login or Register  to view this content.
    You fill in the blanks.

  7. #7
    Registered User
    Join Date
    12-02-2007
    Posts
    23
    This code works:

    Please Login or Register  to view this content.
    Last edited by nousername; 03-12-2008 at 11:03 AM.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Good job

+ 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