question about VB 6 file creation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • henriksonj
    New Member
    • Oct 2006
    • 2

    question about VB 6 file creation

    Hello,
    I'm not very skilled in programming - I need to be able to output to a file that would contain the current date in its name..
    for example c:/temp/resultsSept3020 07.txt
    Can anyone tell me how I would write the 'open for output as' code to accomplish this?
    Many thanks!
    John H.
  • navigator
    New Member
    • Oct 2006
    • 10

    #2
    Try this:


    Open "C:\Temp\Result s" & Format(Now, "mmmddyyyy" ) & ".txt" For Output As #1

    Comment

    • henriksonj
      New Member
      • Oct 2006
      • 2

      #3
      Originally posted by navigator
      Try this:


      Open "C:\Temp\Result s" & Format(Now, "mmmddyyyy" ) & ".txt" For Output As #1
      This works perfectly. My sincere thanks!!!

      Comment

      Working...