Mary90
New Member
- Joined
- Sep 8, 2015
- Messages
- 22
Good day guys!
I'm trying to use a hidden named range to hold the value of a date that I can refer to in my VBA formulae.
So I've created a named range called "ExpiryDate" and it does not refer to a cell, but directly to: "=DATE(2018,12,31)"
So using vba, I'd expect
to be "=DATE(2018,12,31)" and
to be "31 Dec 2018" (or 43465 or whatever date format).
However, it returns the same as the "refersTo" code (including the "=" as the first character)
How can I get the actual date value to be returned so I can set it equal to an integer variable?
Thanks in advance.
I'm trying to use a hidden named range to hold the value of a date that I can refer to in my VBA formulae.
So I've created a named range called "ExpiryDate" and it does not refer to a cell, but directly to: "=DATE(2018,12,31)"
So using vba, I'd expect
Code:
names("ExpiryDate").refersTo
Code:
names("ExpiryDate").value
However, it returns the same as the "refersTo" code (including the "=" as the first character)
How can I get the actual date value to be returned so I can set it equal to an integer variable?
Thanks in advance.