Good afternoon all,
I have a spreadsheet, where I would like the code to automatically use 2 fields to create the file name for saving the file to a SharePoint site.
The code I have is as follows:
Cell G6 is a Date field and usually would be in dd/mm/yyyy format but I am aware that ' / ' are not allowed when saving a file in Excel. I then tried to use a custom format dd-mm-yyyy in the cell but VBA is still recognising this as a Date format and fails.
If I remove the requirement for SubDte to be used in the file name, it saves perfectly to my test environment. (e.g. FileName = Title & "-" ' & SubDte)
Ultimately, my goal is to create the file name based on 2 fields - one being a text string and the other being the submit date of the request.
Any help in correcting my code to achieve this is very much appreciated.
Thank you,
Chris
Bookmarks