ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   HOW TO HIDE/SHOW PICTURE AS PER LOGIC IS NOT DESCRIBED PROPERLY. (https://www.excelbanter.com/excel-programming/422226-how-hide-show-picture-per-logic-not-described-properly.html)

Tushar

HOW TO HIDE/SHOW PICTURE AS PER LOGIC IS NOT DESCRIBED PROPERLY.
 
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.

Gary''s Student

HOW TO HIDE/SHOW PICTURE AS PER LOGIC IS NOT DESCRIBED PROPERLY.
 
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

--
Gary''s Student - gsnu200825


"Tushar" wrote:

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.



All times are GMT +1. The time now is 10:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com