Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have a UserForm and I put the restriction on the "DatePurchase" textbox. so user can not skip this field. it is working fine. I used the following code for that. Private Sub DatePurchase_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Not IsDate(DatePurchase) Then MsgBox "Input must be a date in the format: 'dd/mmm/yyyy'" Cancel = True Else DatePurchase = Format(DatePurchase, "dd/mmm/yyyy") End If End Sub Private Sub CloseForm_Click() Unload Me End Sub when I Load the UserForm and I dont want to go for entry and I want to close this form by close button, with Unload me command. then my userform is not going to close at all, unless I feed the Date in "DatePurchase" Field. when I hit the close button without feeding the Date, the Input message is appearing. "Input must be a date in the format: 'dd/mmm/ yyyy'" I want my Form to be close when I hit the close button Pls give me any suggession....... Regards. Shahzad |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date and User restriction coding | Excel Worksheet Functions | |||
New date based on one date field minus minutes in another field | Excel Discussion (Misc queries) | |||
Linked date field in worksheet defaults a blank field as 1/0/1900 | Excel Worksheet Functions | |||
Converting a date field into a month-year only field | Excel Discussion (Misc queries) | |||
How to Join/concatenate a date field with a time field in Excel? | Excel Discussion (Misc queries) |