Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Here is my code that I'm having a problem with. I want the programming to
start evaluating from cell I2 through the rest of the column. Is there a different way to write the code. Well the workbook opens, I get a message that says 'Type Mismatch' and highlights the boolean section of the if statement. Private Sub Workbook_Open() Dim Target As Range Application.Workbooks(1).Worksheets(5).Activate ActiveSheet.Range("I2").Select For Each Target In Range("I2:I20") If Target.Value < "" And DateValue(Target.Value) - DateValue(Now) <= 2 And DateValue(Target.Value) - DateValue(Now) 0 And Target.Offset _(columnoffset:=-1).Value = "" Then MsgBox "Order Due" & " " & Target.Offset(columnoffset:=-7).Value End If Next Target End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
converting text in cell to a date time | Excel Worksheet Functions | |||
Recurring annual events using a specific date as a trigger date | Excel Worksheet Functions | |||
extract date from the most current date | Excel Discussion (Misc queries) | |||
Date issue between Windows and Macintosh version | Excel Discussion (Misc queries) | |||
Problem with Date format from VBA code | Excel Discussion (Misc queries) |