Consulting

Results 1 to 4 of 4

Thread: Solved: Save as 'todays date'

  1. #1

    Solved: Save as 'todays date'

    Hi

    I have a macro that does some stuff (creates a list of prices).

    I am using the 'Application.Dialogs(xlDialogSaveAs).Show' to open the
    save window after it finishes.

    Is there a way to automatically make the 'File name' populate with yesterdays date and the 'save as type' default to Excel (the macro takes a text file as its source data so tries to save as text type.

    thanks
    Jon

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Application.Dialogs(xlDialogSaveAs).Show Format(Date - 1, "yyyy_mm_dd") & ".xls"
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Hi

    Thanks for reply and almost there

    Saves as "2010_08_26.xls" and doesnt change 'save as type'

    Jon

  4. #4
    Strange - now it works

    thanks again

    Jon

Posting Permissions

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