pcsparky
10-17-2010, 02:20 AM
I have followed the advice on the Article pages to 'Create a Delay' using:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
at the top of a module with this code:
Sub DelayTest()
Menu.lblSaved.Visible = True
Sleep 1000& 'delay in milliseconds
Menu.lblSaved.Visible = False
End Sub
I'm trying to get a label with caption "Saved" to show for a short time on clicking a Save button on my form. However, when I call 'DelayTest' nothing happens apart from the time delay.
If I run through the code step by step the label does show, the time delay does work, and then the label does disappear again.
I'm baffled if anyone can shed light please.
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
at the top of a module with this code:
Sub DelayTest()
Menu.lblSaved.Visible = True
Sleep 1000& 'delay in milliseconds
Menu.lblSaved.Visible = False
End Sub
I'm trying to get a label with caption "Saved" to show for a short time on clicking a Save button on my form. However, when I call 'DelayTest' nothing happens apart from the time delay.
If I run through the code step by step the label does show, the time delay does work, and then the label does disappear again.
I'm baffled if anyone can shed light please.