bobkap
Active Member
- Joined
- Nov 22, 2009
- Messages
- 323
- Office Version
- 365
- Platform
- Windows
- Mobile
- Web
I have a variable in cell A50 in my sheet called Codes. The name of the variable is Endperdate. I want it to output in the date format as shown below, but it always just gives the Excel number for the date. No doubt I have something wrong with my code. Any help would be greatly appreciated.
Worksheets("Codes").Range("<wbr style="font-family: Arial, Helvetica, sans-serif; font-size: small;">A50").NumberFormat = "m/d/yyyy"
PDFFile = DestFolder & Application.PathSeparator & ws.Name _
& "_" & Endperdate & ".pdf"
Worksheets("Codes").Range("<wbr style="font-family: Arial, Helvetica, sans-serif; font-size: small;">A50").NumberFormat = "m/d/yyyy"
PDFFile = DestFolder & Application.PathSeparator & ws.Name _
& "_" & Endperdate & ".pdf"