Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro Output File Name (2003)

    I have a macro which outputs a snapshot file to a specific location on my server. I'm trying to add the date to the filename with no luck. I keep getting a message that reads I'm out of space, delete unneccesary files or something like that. But if I just go back to naming the file without the date code, it works perfectly. Any ideas... Here is my code that works and the code that doesn't...

    C:test.snp

    "C:" & Date() & "invoices.snp"

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro Output File Name (2003)

    If your standard date format uses the slash / as separator, you cannot use it in a file name: / is not allowed in file names. You could try something like this:

    "C:" & Format(Date(), "yyyymmdd") & "invoices.snp"

    or

    "C:" & Format(Date(), "d-mmm-yy") & "invoices.snp"

Posting Permissions

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