Forum Discussion
DnGr
Apr 10, 2025Brass Contributor
Date_in_VBA
Is there a way I can save date so that the date does not come across a number. I have =today() which gives me the days date. For example, if I save 4/9/2025. The document returns with "nameofdocum...
- Apr 14, 2025
Thanks for your help. I believe I have what I need.
Thank you
DnGr
Apr 11, 2025Brass Contributor
I get the debug message. In my code fName = "PWS_Equipment_" & .Range("G10") & Range("C3").Value2
I will get the name of the document plus a number. C3 is where the current date is. I want C3 to be listed as a date next to the name of the document. When I added the & Format(Date, "m/d/yyyy") at the end of the VBA code all I get is a debug error.
HansVogelaar
Apr 14, 2025MVP
The Value2 property treats dates as numbers, so use .Value or .Text instead of .Value2