![]() |
| ||
| Multiple "OR" process Hello, I'm a newbie at VB and am trying to get some help with a process. My code will check an Excel file for dates and store them in a number of variables. Then I want to be able to compare those dates to the current date. I was thinking about using "Case", but is there a smoother, better way to do this? What I want is to basically say, "If any of these dates meet the criteria, then do something." Thanks, Mark |
| ||
| Re: Multiple "OR" process Hi You can use DateDiff Function to Compare dates DateDiff(interval, date1, date2) Interval may be yyyy -- Year m - Month y - Day of year d - Day w - Weekday ww - Week h - Hour n - Minute s - Second Example Dim TheDate As Date ' Declare variables. |
| All times are GMT -4. The time now is 4:05 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC