LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Forcing a date entry?

Hi Marcotte,

With reference to the calendar control installation issues, see Ron de
Bruin's notes:
http://www.fontstuff.com/vba/vbatut07.htm
See in particular Ron's comments vis-a-vis Office Professional and Access.

To validate your users' textbox date entries, you can use VBA's IsDate
function, e.g. something like:

If IsDate(TextBox1.Text) Then
'Valid Date
'Your code
Else
TextBox1.Text = ""
MsgBox "Invalid date" & vbNewLine _
& "Date must be prior to 1/1/2005 - Please re-enter"
',,,,,,,,,,,,,,,,,,,,,,,
End If


---
Regards,
Norman

"Marcotte A" wrote in message
...
"Norman Jones" wrote:

Hi Junior,

Why not use a pop-up calendar control for the relevant cells?

For Ron de Bruin's code and instructions see:

http://www.rondebruin.nl/calendar.htm


I have a similar problem. I have a text box on a user form where the user

enters a date. I'm having trouble verifying that a valid date was entered.
Using a Calendar would be great. However, after I downloaded and installed
mscal.ocx I'm still having trouble adding a calendar to my user form. I've
added the calendar control to the tool box, but when I try to draw it on the
userform I get the message "Library not registered." with an OK and Help
button. Pressing help opens a help window with absolutely nothing in it.
I'm running XL 2003 on Win XP and installed mscal.ocx in c:\windows\system32
using Start....Run..."regsvr32 mscal.ocx " as instructed by the link on Rons
page. Am I doing something wrong? Is there an easy way (without using a
calendar - since I would have to install this on other computers as well) to
make a text box only accept dates? TIA
Marcotte





 
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
Forcing entry into validation cell Bfrank Excel Discussion (Misc queries) 1 June 15th 09 06:43 PM
forcing cell entry with validation Colleen Excel Discussion (Misc queries) 1 December 11th 06 09:10 PM
Forcing an entry [email protected] Excel Discussion (Misc queries) 3 October 19th 06 10:04 PM
Forcing Combo box entry in VBA Anthony Slater Excel Discussion (Misc queries) 1 December 1st 04 03:09 PM
Forcing Date Entry rbaxter[_3_] Excel Programming 3 December 16th 03 07:36 PM


All times are GMT +1. The time now is 06:01 AM.

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

About Us

"It's about Microsoft Excel"