+ Reply to Thread
Results 1 to 3 of 3

Force File Name Convention

  1. #1
    AD108
    Guest

    Force File Name Convention

    Is there a way to force a user to save a file in a certain format.

    For example the only way they would be able to save the file would be as a
    date in the following format. 12-12-05



  2. #2
    Bob Phillips
    Guest

    Re: Force File Name Convention

    Here is one way that saves it as today's date when closed,

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    ThisWorkbook.SaveAs Format(Date, "dd-mm-yy")
    End Sub
    'This is workbook event code.
    'To input this code, right click on the Excel icon on the worksheet
    '(or next to the File menu if you maximise your workbooks),
    'select View Code from the menu, and paste the code

    but you probably need to give more details on when you wan t this to happen,
    what rules determine that date, etc.

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "AD108" <[email protected]> wrote in message
    news:%[email protected]...
    > Is there a way to force a user to save a file in a certain format.
    >
    > For example the only way they would be able to save the file would be as a
    > date in the following format. 12-12-05
    >
    >




  3. #3
    AD108
    Guest

    Re: Force File Name Convention

    Thanks alot, looks like a good lead for what I am working on.
    "Bob Phillips" <[email protected]> wrote in message
    news:[email protected]...
    > Here is one way that saves it as today's date when closed,
    >
    > Private Sub Workbook_BeforeClose(Cancel As Boolean)
    > ThisWorkbook.SaveAs Format(Date, "dd-mm-yy")
    > End Sub
    > 'This is workbook event code.
    > 'To input this code, right click on the Excel icon on the worksheet
    > '(or next to the File menu if you maximise your workbooks),
    > 'select View Code from the menu, and paste the code
    >
    > but you probably need to give more details on when you wan t this to

    happen,
    > what rules determine that date, etc.
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "AD108" <[email protected]> wrote in message
    > news:%[email protected]...
    > > Is there a way to force a user to save a file in a certain format.
    > >
    > > For example the only way they would be able to save the file would be as

    a
    > > date in the following format. 12-12-05
    > >
    > >

    >
    >




+ 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