Flashing Object

RogerC

Well-known Member
Joined
Mar 25, 2002
Messages
536
I've searched the board and found out how to makes cells flash in a Worksheet, but I need to make an object flash when the user activates a macro. In this case the object is a .jpg image. Has anyone ever done this?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
No, but I sure would like to know how you got your cell to flash, tried that recently and retreated in frustration.
 
Upvote 0
Roger, I modified the code supplied by Joe Was to flash a jpg. Give it a try and see if it works for you.

<pre>
Sub Flashjpg()
'modified code from Joe Was

Dim myJPG As Object
Dim x As Integer
Dim fSpeed

'Make this picture flash!
Set myJPG = ActiveSheet.Pictures("picture 1")
Application.DisplayStatusBar = True
Application.StatusBar = "... Select Cell to Stop and Edit or Wait for Flashing to Stop! "

'Make the cell range flash fast: 0.01 to slow: 0.99
fSpeed = 0.2

'Make cell flash, this many times!
Do Until x = 35

'Run loop!
DoEvents
Start = Timer
Delay = Start + fSpeed
Do Until Timer > Delay
DoEvents
myJPG.Visible = False

Loop
Start = Timer
Delay = Start + fSpeed
Do Until Timer > Delay
DoEvents
myJPG.Visible = True

Loop
x = x + 1
Loop
Application.StatusBar = False
Application.DisplayStatusBar = Application.DisplayStatusBar
End Sub

</pre>
 
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,315
Members
448,886
Latest member
GBCTeacher

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top