Application.wait & Blinking Connector

T

Tom Rudski

Is there a VB command that can make a spreadsheet 'wait'
without using the VBA Application.Wait command. So I can
wait less than a second. I tried the TimeValues but it
doesn't allow msec, just sec.

I am trying to 'blink' a 'connector' by using
the '.visible' function, 'RGB' color changing and
the 'Wait' statement. It works but not real clean.

If I run the Sub() 'For 1 to 50 by 1' it runs slow and
blinking does look right. But when I press the 'Esc' key
the routine still processes thru '50' and the blinking
looks very good.

Any ideas

TIA
 
T

Tom Ogilvy

Maybe you could flash it yourself when you show the userform:

In a general module:

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

Sub Blink()
Dim i As Long
For i = 1 To 50
' set one color

Call Sleep(75)

' set another color

Call Sleep(75)
Next i
End Sub
 

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