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: 27
Default Userform text box return date value?

I have a text box on a form and i'd like to be able to use it to enter
a date in the format mm/dd/yy and compare it to cells that have the
date format

If Not (form1.Date1.Value = "" And form1.Date2.Value = "") Then
For Each cell In Range(Cells(2, 1), _
Cells(Worksheets("Data").UsedRange.Rows.Count - 1, 1))
If Not (cell.Value = form1.Date1.Value And _
cell.Value <= form1.Date2.Value) Then
cell.EntireRow.Hidden = True
End If
Next cell
End If

currently, when excuting this code, even entering the dates in the
format mm/dd/yyyy causes all rows to be hidden

any help would be great

 
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
Using TODAY function to return a date as text GH Excel Discussion (Misc queries) 1 December 19th 06 06:17 PM
VLOOKUP return text not date Paul Dennis Excel Worksheet Functions 3 September 28th 06 12:11 PM
Auto return month as text date martins Excel Discussion (Misc queries) 1 March 19th 06 02:59 PM
UserForm text box Date formatting Dan Excel Programming 2 November 1st 04 04:38 AM
Userform cannot return any values Nick Excel Programming 6 August 17th 04 05:00 PM


All times are GMT +1. The time now is 10:00 PM.

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"