G-fer
12-03-2008, 05:49 AM
Hi all,
In cells D15 to D25 and G15 to G25 I need to enter hours worked in the format hh:mm.
By using the normal data validation procedure (Time), I can trap and prevent entries that are not in the format hh:mm. However, the normal validation procedure does not see 4:65 as an illegal entry, but instead forces the cell back from custom hh:mm format to general format, which causes havoc.
I guess I need a VBA routine that will examine the figure entered, determine that it is in the format hh:mm, determine that the "mm" componant is not greater than 59 and, in the case of an error, present a messagebox to that effect.
Could anyone help me please ??
G-fer.
In cells D15 to D25 and G15 to G25 I need to enter hours worked in the format hh:mm.
By using the normal data validation procedure (Time), I can trap and prevent entries that are not in the format hh:mm. However, the normal validation procedure does not see 4:65 as an illegal entry, but instead forces the cell back from custom hh:mm format to general format, which causes havoc.
I guess I need a VBA routine that will examine the figure entered, determine that it is in the format hh:mm, determine that the "mm" componant is not greater than 59 and, in the case of an error, present a messagebox to that effect.
Could anyone help me please ??
G-fer.