Hi
I am trying to make a message box that display a given piece of text along with a date. My problem is that the message box never displays the date in A6 when that logival statement is satisfied - it always comes up with the text & 12:00 AM. Can anyone help?
Sub Graph
Dim Y As Date
Y = Range("A6")
If Y = #1/1/03# Then
Text = "Contract signed by IPGJVs for whole term"
ElseIf Y = #12/22/31# Then
Text = "Contract signed by Domgas JVs for whole term"
Else
Text = "Contract assigned by Domgas JVs to IPGJVs on " & Y
End If
MsgBox "" & Text, , "Graph Assumptions"
End Sub
I am trying to make a message box that display a given piece of text along with a date. My problem is that the message box never displays the date in A6 when that logival statement is satisfied - it always comes up with the text & 12:00 AM. Can anyone help?
Sub Graph
Dim Y As Date
Y = Range("A6")
If Y = #1/1/03# Then
Text = "Contract signed by IPGJVs for whole term"
ElseIf Y = #12/22/31# Then
Text = "Contract signed by Domgas JVs for whole term"
Else
Text = "Contract assigned by Domgas JVs to IPGJVs on " & Y
End If
MsgBox "" & Text, , "Graph Assumptions"
End Sub