Thank you looking at your code I realized I needed to read the values for configstartdate and configenddate from the worksheet into a local variable before the operation, it works now.
probabaly basic stuff but just getting into VBA.
User Profile
Collapse
-
VBA noob Trouble with DateDiff in VBA application
the following is not returning a negative number even when the start date is later than the end date. Some help would be very appreciated! thank you -
Private Sub CommandButton1_ Click()
If DateDiff("d", ConfigStartDate , ConfigEndDate) >= 0 Then
Range("ConfigEn dDate").Value = Calendar1.Value
UserForm3.Hide
Else
MsgBox "End...
No activity results to display
Show More
Leave a comment: