+ Reply to Thread
Results 1 to 5 of 5

Saving FileName

  1. #1
    CyndyG
    Guest

    Saving FileName

    How do I creat code that would require the user to save the file in a certain
    format. Example Cindy Grover 041395.xls
    This should be a daily prompt using first and last name and the date.
    The user will be using a template.
    Also would I create a button on the template that prompts the user?

  2. #2
    Harald Staff
    Guest

    Re: Saving FileName

    This depends on where the user's first and last name is found. But if it's a
    username in Excel then something like

    Sub test()
    Dim sFile As String
    sFile = Application.UserName & " " & _
    Format(Date, "yymmdd") & ".xls"
    MsgBox sFile
    End Sub

    You can't require anything from users without annoying them too much, but if
    you construct a thing likte this as a default qualified guess for a "save
    as" name then you'll get what you want and the users don't have to think or
    work.

    HTH. Best wishes Harald

    "CyndyG" <[email protected]> skrev i melding
    news:[email protected]...
    > How do I creat code that would require the user to save the file in a

    certain
    > format. Example Cindy Grover 041395.xls
    > This should be a daily prompt using first and last name and the date.
    > The user will be using a template.
    > Also would I create a button on the template that prompts the user?




  3. #3
    CyndyG
    Guest

    Re: Saving FileName

    Thanks Harold.
    Are you saying to store the user name within an Excel worksheet?

    "Harald Staff" wrote:

    > This depends on where the user's first and last name is found. But if it's a
    > username in Excel then something like
    >
    > Sub test()
    > Dim sFile As String
    > sFile = Application.UserName & " " & _
    > Format(Date, "yymmdd") & ".xls"
    > MsgBox sFile
    > End Sub
    >
    > You can't require anything from users without annoying them too much, but if
    > you construct a thing likte this as a default qualified guess for a "save
    > as" name then you'll get what you want and the users don't have to think or
    > work.
    >
    > HTH. Best wishes Harald
    >
    > "CyndyG" <[email protected]> skrev i melding
    > news:[email protected]...
    > > How do I creat code that would require the user to save the file in a

    > certain
    > > format. Example Cindy Grover 041395.xls
    > > This should be a daily prompt using first and last name and the date.
    > > The user will be using a template.
    > > Also would I create a button on the template that prompts the user?

    >
    >
    >


  4. #4
    Harald Staff
    Guest

    Re: Saving FileName

    It's possible to use a computer that doesn't have your name anywhere in it.
    In those cases the computer can't fill in a username for you. Excel has a
    username placeholder in the Tools > Options > General menu. Many people have
    their name there, others have the company name or just nonsense. That's the
    "in excel" username used in the code I gave you. Then there's the name of
    the profile that has logged onto the computer.

    Only you can tell how to get "Cindy Grover" into your generated filename. It
    depends on the things above.

    HTH. Best wishes Harald

    "CyndyG" <[email protected]> skrev i melding
    news:[email protected]...
    > Thanks Harold.
    > Are you saying to store the user name within an Excel worksheet?
    >
    > "Harald Staff" wrote:
    >
    > > This depends on where the user's first and last name is found. But if

    it's a
    > > username in Excel then something like
    > >
    > > Sub test()
    > > Dim sFile As String
    > > sFile = Application.UserName & " " & _
    > > Format(Date, "yymmdd") & ".xls"
    > > MsgBox sFile
    > > End Sub
    > >
    > > You can't require anything from users without annoying them too much,

    but if
    > > you construct a thing likte this as a default qualified guess for a

    "save
    > > as" name then you'll get what you want and the users don't have to think

    or
    > > work.
    > >
    > > HTH. Best wishes Harald
    > >
    > > "CyndyG" <[email protected]> skrev i melding
    > > news:[email protected]...
    > > > How do I creat code that would require the user to save the file in a

    > > certain
    > > > format. Example Cindy Grover 041395.xls
    > > > This should be a daily prompt using first and last name and the date.
    > > > The user will be using a template.
    > > > Also would I create a button on the template that prompts the user?

    > >
    > >
    > >




  5. #5
    CyndyG
    Guest

    Re: Saving FileName

    Actually the name of the file will be referring to some other than the
    computer or application users. It is more like a customer who is ordering
    something and to keep track of the customer the file will be named after them
    and the date the order was placed. The reason why it is being done this way
    is because information is being scanned into an excel spreadsheet. For
    example 100 tapes were scanned into a spreadsheet for Harry James. An excel
    file now resides for HarryJames041305. This info will be input into a table
    on the Access database after a record is created for Harry and saved the tape
    information will be pulled from that fle using an array. The the record in
    the database should match the data from the file created with Excel. So when
    I view record in the database for Harry the excel data how show correctly in
    the listbox.
    "Harald Staff" wrote:

    > It's possible to use a computer that doesn't have your name anywhere in it.
    > In those cases the computer can't fill in a username for you. Excel has a
    > username placeholder in the Tools > Options > General menu. Many people have
    > their name there, others have the company name or just nonsense. That's the
    > "in excel" username used in the code I gave you. Then there's the name of
    > the profile that has logged onto the computer.
    >
    > Only you can tell how to get "Cindy Grover" into your generated filename. It
    > depends on the things above.
    >
    > HTH. Best wishes Harald
    >
    > "CyndyG" <[email protected]> skrev i melding
    > news:[email protected]...
    > > Thanks Harold.
    > > Are you saying to store the user name within an Excel worksheet?
    > >
    > > "Harald Staff" wrote:
    > >
    > > > This depends on where the user's first and last name is found. But if

    > it's a
    > > > username in Excel then something like
    > > >
    > > > Sub test()
    > > > Dim sFile As String
    > > > sFile = Application.UserName & " " & _
    > > > Format(Date, "yymmdd") & ".xls"
    > > > MsgBox sFile
    > > > End Sub
    > > >
    > > > You can't require anything from users without annoying them too much,

    > but if
    > > > you construct a thing likte this as a default qualified guess for a

    > "save
    > > > as" name then you'll get what you want and the users don't have to think

    > or
    > > > work.
    > > >
    > > > HTH. Best wishes Harald
    > > >
    > > > "CyndyG" <[email protected]> skrev i melding
    > > > news:[email protected]...
    > > > > How do I creat code that would require the user to save the file in a
    > > > certain
    > > > > format. Example Cindy Grover 041395.xls
    > > > > This should be a daily prompt using first and last name and the date.
    > > > > The user will be using a template.
    > > > > Also would I create a button on the template that prompts the user?
    > > >
    > > >
    > > >

    >
    >
    >


+ 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