ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide objects based on value in cell (https://www.excelbanter.com/excel-programming/324781-hide-objects-based-value-cell.html)

Julia Chromicz

Hide objects based on value in cell
 
I have used autoshapes to manually create an organization chart in Excel (as
opposed to using Insert = Diagram = Organization Chart).

The text in each box of the flow chart is linked to cells in a separate
worksheet. Is there a way to hide an object if the cell it is linked to is
blank?

I'm using Excel (Office 2002, SP-2).

Thanks!
Julia Chromicz

K Dales[_2_]

Hide objects based on value in cell
 
For each shape you have that needs to be switched on/off, you could put a
line like the one below in your Worksheet_Change event proceducould put in
a Worksheet_Change event procedure such as this:
Sheets("Sheet1").Shapes("MyShape 1").Visible = (Range("LinkedCell1").Value
< "")

This should work even if the cell value is the result of a formula.

"Julia Chromicz" wrote:

I have used autoshapes to manually create an organization chart in Excel (as
opposed to using Insert = Diagram = Organization Chart).

The text in each box of the flow chart is linked to cells in a separate
worksheet. Is there a way to hide an object if the cell it is linked to is
blank?

I'm using Excel (Office 2002, SP-2).

Thanks!
Julia Chromicz



All times are GMT +1. The time now is 08:58 AM.

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