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: 1
Default Comparing date to string


Hi,
I have a user form on a worksheet that contains 2 text boxes, one o
the text boxes is populated with a date by means of a calendar control
and the other textbox is populated with a string value that correspond
to the year (2005, 2006, 2007 etc) when the userform is initialised.
command button enters these 2 values onto the sheet.

I need to use the command button that when clicked will compare th
date value in the one textbox to the year string value in the othe
textbox [If that makes sense]. So, for example, preventing a date i
2006 being entered in 2005.

Can anyone help me out with the correct way of doing this? Should I b
using cDate to convert the date value to a string value befor
comparing the 2 string values?

Any help would be appreciated.
Be

--
benjammin
-----------------------------------------------------------------------
benjammind's Profile: http://www.excelforum.com/member.php...fo&userid=1821
View this thread: http://www.excelforum.com/showthread.php?threadid=38431

 
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
Comparing the first 2 characters of a coloumn to a string Jaime Excel Worksheet Functions 1 April 16th 08 06:28 AM
Comparing String Values Jim Rech Excel Programming 0 September 2nd 04 05:08 PM
Comparing String Values Roderick[_4_] Excel Programming 0 September 2nd 04 03:18 PM
Comparing String Values Jim Rech Excel Programming 0 September 2nd 04 03:14 PM
Question about comparing mixed case string values TBA[_2_] Excel Programming 4 January 17th 04 06:32 PM


All times are GMT +1. The time now is 08:41 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"