Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
date range vba code
New to vba. Trying to do a basic date range. If calendar
date is between start date and end date then display date matches if not then display date doesn't match. I know its something really simple. Please help. Sub Macro2() Dim calendar_dte, start_dte, end_dte As Integer calendar_dte = Range("E1").Select 'calendar date start_dte = Range("D1").Select 'Start Date end_dte = Range("D2").Select 'End Date If (calendar_dte = start_dte And calendar_dte <= end_dte) Then MsgBox "Calendar Date Matches Vacation Range" Else MsgBox "Calendar Date Does Not Match Vacation Range" End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code to conditional format all black after date specified in code? | Excel Discussion (Misc queries) | |||
Convert a julian gregorian date code into a regular date | Excel Worksheet Functions | |||
How to count dates within a certain range in a column with mutiple date range entries | Excel Worksheet Functions | |||
VB Code Naming a Range (range changes each time) | Excel Programming | |||
code pasting a date changes date format in current month only | Excel Programming |