Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well, that was easy! I figured it woud be the American dates acting up, but
couldn't find the function to handle it. Thank you very much for your help! /Sune "Incidental" wrote: Hi Sune Your problem is due to excel using american dates, you can fix this by using the CDate function which is demonstrated below, if you need any more info try searching for post on CDate by Tom Ogilvy he must have around a million posts on this by now... example code Option Explicit Dim UpperDate, LowerDate As Date Private Sub CommandButton1_Click() LowerDate = [a1].Value UpperDate = [a2].Value LowerDate = CDate(LowerDate) UpperDate = CDate(UpperDate) MsgBox LowerDate & vbNewLine & UpperDate End Sub hope this helps |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error Handling | Excel Programming | |||
error handling | Excel Programming | |||
Error handling. | Excel Programming | |||
Handling Dates in VLookup | Excel Programming | |||
Error handling with a handling routine | Excel Programming |