Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
day vs time format ??
HYCH.... I have the below code that calls a userform to be completed,
depending on the time. ie, our night shift work from 21:00 to 06:00 and the below code allows me to call the userform mnpickfrm as long as the day in cell F2 is shown as monday, but i am unable to pull this same form after midnight, i have the time being placed in q1, as a guide to whether 06:00 has been passed, obviously the code below is not giving me the option to pull back the mnpickfrm after midnight, can this be achieved with the code below or am i missing something??? HYCH Sub mnpick() With Range("q1") .Value = Time End With If Weekday(Worksheets("Load Input Sheet").Range("F2").Value) = vbMonday Then mnpickfrm.Show Else If Weekday(Worksheets("Load Input Sheet").Range("F2").Value) = vbTuesday Then Else If (Worksheets("pick allocations").Range("q1").Value) < "06:00:00" Then mnpickfrm.Show Else MsgBox "Incorrect Day Selected" End If End If End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert date + time text format to date format | Excel Worksheet Functions | |||
Custom Cell format to mimic time format | Excel Discussion (Misc queries) | |||
convert time imported as text to time format for calculations | Excel Worksheet Functions | |||
How to format cells in Excel for time in format mm:ss.00 | Excel Worksheet Functions | |||
Remove time from a date and time field? Format removes the displa. | Excel Worksheet Functions |