Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i wrote a small program to save information from textboxes to a spreadsheet, now i want to save by date and i have tried this but am getting an error message that says array out of bounds here is my code:
Dim Filename As String = "c:\Users\Documents\testfile.xls"(Format(Now.Date, "MMddyy"))
what needs to happen is everyday this program must open a new spreadsheet and save it by the date
Posted

1 solution

Try this

VB
Dim fileName As String = String.Format("C:\Users\Documents\testFile{0}.xls", DateTime.Now.ToString("MMddyy"))

Hope this helps
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900