Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Forcing a date entry?

Hi my worksheet has cells that are formatted as dates
however, they will accept txt entrys
how can i require the user to enter a date in these cells?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Forcing a date entry?

Junior

try

Data Menu Validation set Validation criteria = date

fill in the rest of the required details to suit your requirement

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Forcing a date entry?

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


---
Regards,
Norman



"Junior" wrote in message
...
Hi my worksheet has cells that are formatted as dates
however, they will accept txt entrys
how can i require the user to enter a date in these cells?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Forcing a date entry?

Look at Data=Validation and select Date.

--
Regards,
Tom Ogilvy

"Junior" wrote in message
...
Hi my worksheet has cells that are formatted as dates
however, they will accept txt entrys
how can i require the user to enter a date in these cells?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Forcing a date entry?

thnaks everyone-
"Junior" wrote in message
...
Hi my worksheet has cells that are formatted as dates
however, they will accept txt entrys
how can i require the user to enter a date in these cells?






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Forcing a date entry?

"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
  #7   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



Reply
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 05:11 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"