How to fade out or make and image opaque

samco

New Member
Joined
Sep 15, 2005
Messages
26
I wondering if It is possible to make and image opaque when and event is triggered or change the contrast
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hello, samco!

see the result of this macro
can you spell out the conditions and what shape you would like to use ?
(advise to stick to the inbuilt shapes if possible)
Code:
Option Explicit

Sub heart_disappears()
'Erik Van Geit
'050916 0152
Dim I As Integer
Dim delay As Double
Dim starttime As Double

ActiveSheet.Shapes.AddShape(msoShapeHeart, 136, 43, 156.75, 149.25).Name = "heart"

With ActiveSheet.Shapes("heart")
.Fill.ForeColor.SchemeColor = 2
  For I = 1 To 100
  .Fill.Transparency = I / 100
    delay = 0.1
    starttime = Timer
    Do
    DoEvents
    Loop While Timer - starttime < delay
  Next I
.Delete
End With
End Sub

kind regards,
Erik

EDIT: removed one line Dim heart As Object
 
Upvote 0
UFO Macro, very creative!

I like that...makes you really appreciate what you can really do with excel.

Good stuff erik!
 
Upvote 0
The shape should be typically square... and on the selection of an option button it would fade out one image and highlight the other....Thanks for the code you put up
Cool stuff :cool:
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,521
Members
449,088
Latest member
RandomExceller01

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