av8tordude
02-01-2011, 07:19 PM
I have 5 date-boxes (Date1, Date2, Date3, etc) on a multipage. I have this code in each of the date boxes. How can I create a public sub that I can reference to this code, but substitute the Date-box's name
Thanks
If LenB(Range("B11").Value) > 0 Then
If Year(Date5) <> Year(Range("B11").Value) Then
Ent5.Enabled = False
If Not AlreadyShown Then
MsgBox "You may not register a FY" & Year(Date5) & " expense in a FY" & Year(Range("B11")) & " Expense Report Log."
AlreadyShown = True
End If
End If
End If
Thanks
If LenB(Range("B11").Value) > 0 Then
If Year(Date5) <> Year(Range("B11").Value) Then
Ent5.Enabled = False
If Not AlreadyShown Then
MsgBox "You may not register a FY" & Year(Date5) & " expense in a FY" & Year(Range("B11")) & " Expense Report Log."
AlreadyShown = True
End If
End If
End If