Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Use If statement to display picture

0 views
Skip to first unread message

Rob

unread,
Apr 25, 2003, 3:36:11 PM4/25/03
to
Is there a way to display a picture (clipart, Bitmap, etc.)
using an If statement?

Example: If(H3>100,Picture 1,"").

I would like to display a graphic on our sales flash
everytime we make budget.

Thank you,

Rob

Jason Morin

unread,
Apr 25, 2003, 4:22:28 PM4/25/03
to
Go ahead and insert the picture on your worksheet. Then
load this macro to hide it:

Sub Hide_It()
ActiveSheet.Shapes("Picture 1").Visible = False
End Sub

Press Alt+F11, click on the ThisWorkbook module for your
file, insert the code above, and run it. Then click on the
appropriate sheet module and insert this code:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count > 1 Then Exit Sub
With Range("H3")
If .Value > 100 Then
ActiveSheet.Shapes("Picture 1").Visible = True
End If
End With
End Sub

--
HTH
Jason
Atlanta, GA

>.
>

Rob

unread,
Apr 25, 2003, 5:14:19 PM4/25/03
to
Thanks Jason from our whole team! This works well, and I
have learned something new.

Thanks again,

Rob

>.
>

0 new messages