PDA

View Full Version : Blink Control



Djblois
05-30-2008, 09:19 AM
I am trying to have it so when a user clicks a button then it blinks a particular control. This is the code I tried:

Me.cobCurrentFile.Visible = False
Application.Wait (3)
Me.cobCurrentFile.Visible = True
Application.Wait (3)
Me.cobCurrentFile.Visible = False
Application.Wait (3)
Me.cobCurrentFile.Visible = True

it looks like it isn't doing anything. I don't get an error or anything-it just doesn't work.

Bob Phillips
05-30-2008, 09:30 AM
What a terrible idea Daniel. I think that if you sent me a workbook that did that, I would be round with a pick-axe to see if I could make you blink!

Notwithstanding that, just for the Excel exercise



Dim i As Long

For i = 1 To 5 'number of blinks

Me.cobCurrentFile.Visible = False
Application.Wait Now() + TimeSerial(0, 0, 1)
Me.cobCurrentFile.Visible = True
Application.Wait Now() + TimeSerial(0, 0, 1)
Next i

grichey
05-30-2008, 09:55 AM
Is there a way to just make it blink on into perpetuity while still being able to work with the workbook?

grichey
05-30-2008, 09:55 AM
Note: it's not the blinking I really care about, it's the running of it while doing other stuff that I'm curious about.

Bob Phillips
05-30-2008, 10:22 AM
You would have to use OnTime.

Djblois
05-30-2008, 10:30 AM
The reason why I want the control to blink is I have set up a few errors the pop up at the bottom of my user form. I try to be clear as possible on how to fix the error but if the user isn't sure what they need to do to fix the issue then they click the help button which blinks the control they need to fix.