HOW TO HIDE/SHOW PICTURE AS PER LOGIC IS NOT DESCRIBED PROPERLY.

  • Thread starter Thread starter Tushar
  • Start date Start date
T

Tushar

HOW TO HIDE/SHOW PICTURE AS PER LOGIC ? SAY IF A CELL VALUE IS 1, THE PICTURE
WILL SHOW AND 0 FOR HIDING. THE PICTURE.SHOW/HIDE OF PICTURE WILL DEPEND ON
LOGIC OF A FORMULA OR CELL CONTENT ETC.
 
This way is for a manual entry in cell A1 (not a formula in cell A1)

Put this event macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Set a1 = Range("A1")
If Intersect(a1, t) Is Nothing Then Exit Sub
If a1.Value = 1 Then
ActiveSheet.Shapes("Picture 1").Visible = True
Else
ActiveSheet.Shapes("Picture 1").Visible = False
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top