ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Application.wait & Blinking Connector (https://www.excelbanter.com/excel-programming/293656-application-wait-blinking-connector.html)

Tom Rudski[_2_]

Application.wait & Blinking Connector
 
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




Tom Ogilvy

Application.wait & Blinking Connector
 
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

--
Regards,
Tom Ogilvy




"Tom Rudski" wrote in message
...
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







All times are GMT +1. The time now is 08:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com