On my worksheet, the user enters a date into cell A1. Suppose he enters "05/24" and tabs out. It is assumed the date is 2022-05-24.
My worksheet selection change code reformats that cell to display "May-24 (Tue)", which is correct. We'll use May 24, 2022 for the example for the remainder of this question.
Variable svcDate is declared as date. It's value after the user enters the valid date of May 24 equals 2022-05-24.
I have this code:
After it is executed, dt = 2024-05-22. Not only is that the wrong date, but it's not formatted as desired. I was really expecting the result of dt = 24-May-22. What am I doing wrong here?
Moving forward, I want to use the value of dt as a component of a string.
To result in a value of strfn of "WS_24-May_22.xlsx". With my code dealing with variable dt, will I get the results I'm looking for? Or will I need to set dt differently? I'm not sure I can put a date variable into a string concatenation.
Bookmarks