Hey Phil,
How are ya? Hope all is well. Long time, no hear.
Anyway, your answers. Their dependent on whether or not you are referring to a VBA solution or a worksheet function solution. I'm going to assume with all our past dealings that you're talking VBA solution, probably on a UserForm. Yes?
1) Perform an IsNumeric test on it. Something like this ...
As far as your number 2 goes, that gets a little more difficult. You can perform a check on it by using the IsDate function in VBA (which this is inaccessible as a worksheet function, hence my KB entry here). Truthfully, it won't matter what format they use, barring your system regional settings, as long as it's a recognized date.If IsNumeric(Me.TextBox1.Value) Then 'code for true Else 'code for false End If
I know we've talked about this date issue before. You've mentioned quite a few times about textboxes, I think I've shot back 'use comboboxes'.I still suggest using comboboxes. You can then piece-meal your date together with DateSerial function to a Date variable. I've seen a LOT of users and IMHO this is the easiest way to go and most universally recognized. (Yes, I'm going to keep preaching the combobox issue to you. LOL!)
Take care buddy.





I still suggest using comboboxes. You can then piece-meal your date together with DateSerial function to a Date variable. I've seen a LOT of users and IMHO this is the easiest way to go and most universally recognized. (Yes, I'm going to keep preaching the combobox issue to you. LOL!)
Reply With Quote