What about:
VB:RefGTW_Date_txt = CStr ( CDate(GTW_Date_txt) + 28 )
I have two text boxes on a userform one you manually enter the date and the other automatically calculates the date 28 days in advance. This works until you try and change the date in the manual text box then I get a Type Mismatch error
Can anyone help please
Code as follows:
ThanksVB:Private Sub GTW_Date_txt_Change() RefGTW_Date_txt = CDate(GTW_Date_txt) + 28 End Sub
Last edited by Miss KF; April 12th, 2006 at 19:23.
What about:
VB:RefGTW_Date_txt = CStr ( CDate(GTW_Date_txt) + 28 )
Tried your suggestion it still gives me the Type mismatch error
Thanks
If you convert the date to a number first you should then be able to add 28 to it, then convert it back to a date, e.g.
Hope this helps.VB:CDate(DateValue(GTW_Date_txt) + 28)
Regards,
Batman.
Thanks Batman
I've added it to the Exit procedure, I think using the Change procedure may also have been causing the problems
Karen
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks