LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Input message problem for Date textbox

Dear Sir,

I have a userform with text box "DatePurchase" and other textboxes.
when I load my userform and when I entered the data it is working
fine,

the problem is this when I load the form for date entry and the form
is Empty and I want to close my form with close button (unload me)
command. it is showing pop up message (input message) "Input must be a
date in the format: 'dd/mmm/yyyy"

when I enter any date then press the close button then it closing.

Pls help me in this regard. I am using the following code.


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

waiting for response.

Regards



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
show the input message of a data validation list on a textbox and set editable HCS7 Excel Discussion (Misc queries) 3 November 20th 08 11:43 AM
A macro to deactivate Input Message textbox without deactivatingError Alert messages [email protected] Excel Programming 0 April 21st 08 03:28 PM
Display input message in textbox - with merged cells Martin[_21_] Excel Programming 6 January 26th 06 09:47 AM
Input for TextBox having a mask for date or $ amount jlroper[_4_] Excel Programming 2 September 25th 05 03:17 PM
TEXTBOX - VALIDATE DATE INPUT Steve_G Excel Programming 3 June 12th 05 04:59 AM


All times are GMT +1. The time now is 08:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"