Wait less than a second

C

Claus

Hi

I would like to delay the hiding of 4 columns, someting like

Columns("R").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("S").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("T").Hidden = True
Application.Wait (Now + TimeValue("0:00:01"))
Columns("U:").Hidden = True

How do i define a time less than a second ?

Hoping for an answer


Regards,
Claus
 
R

RB Smissaert

Put this at the very top of your code module:

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Then where you want to wait put something like this:

Wait 500 'wait 0.5 seconds


RBS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top