ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   IIF statement to hide a graphic (https://www.excelbanter.com/excel-programming/440202-iif-statement-hide-graphic.html)

Bob

IIF statement to hide a graphic
 
How can I use IIF statement to display or hide a graphic?

marcus[_3_]

IIF statement to hide a graphic
 
Hi Bob

If by Graphic you mean a chart. Try this it will hide charts on a
page if a condition is not true.

Take care
Marcus


Option Explicit

Sub VisibleChObj()
If Range("B1").Value = 1 Then
ActiveSheet.ChartObjects.Visible = True
Else
ActiveSheet.ChartObjects.Visible = False
End If

End Sub


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

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