Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assuming xl2000 or later:
Dim s1 as String, s2 as String s1 = Date1t.text s2 = Date2t.text s1 = Replace(s1,".","/") s2 = Replace(s2,".","/") if isdate(s1) then Date1 = cdate(s1) else msgbox "Bad date" Date1t.Text = "" exit sub end if if isdate(s2) then Date2 = cdate(s2) else msgbox "Bad Date" Date2t.Text exit sub End if -- Regards, Tom Ogilvy Tom, For some reason I cannot get this to work, dont know why? ive run through it with F8 and it goes through the code but doesnt replace anything. Any ideas what might be wrong? Duncan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
permanent conversion of 1904 date format to 1900 date format | Excel Worksheet Functions | |||
How do I convert dd/mm/yy date format to yyddd Julian date format | Excel Worksheet Functions | |||
Convert european foreign date format to US date format | Excel Worksheet Functions | |||
code to convert date from TEXT format (03-02) to DATE format (200203) | Excel Programming | |||
Change a date in text format xx.xx.20xx to a recognised date format | Excel Programming |