Variable Date vs variant
THANKS Dave! It seems that all:
..NumberFormat
..Value2
..PrefixCharacter
together could ensure that the actual data entered by a user (whatever
type) are stored.
Would the above be a correct statement?
I'm just concerned that i might have overlooked something (some weird
data/datatype combination that a user might come up with accidentally)
and the ws might end up storing something that the user actually
wasn't entering... How certain/safe the above is?
(e.g., when I tried .text - if the column is too narrow and a proper
date gets squeezed to look #### - .text grabs only the #### and not
the value behind it...)
Also, it would be great if you could advise the best way to validate a
date (i.e., to validate if the entered value is a valid date). Should
i use 'isnumeric' and then come up with 'valid ranges' or what's the
best way?
It would be really great if you could advise regarding both of the
above: (1) concern regarding entered vs. stored data (as I'm not
confident I've come up with all possible scenarios where VBA might
'convert' a value into something unexpected (to me anyway)), (2) Date
validation.
Thanks again!
|