ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Making visible a picture (https://www.excelbanter.com/excel-discussion-misc-queries/161736-making-visible-picture.html)

xavi garriga

Making visible a picture
 
Hi to all;

I need to do the following:

If a cell value is zero, a picture must appear. But if this cell's value is
different than zero; this picture has to disappear. How can I do this?
Suppose I want to do this without clicking any button, only changing the cell
value.

Is it possible?

Thanks to all;
--
atrep

JW[_2_]

Making visible a picture
 
Right click the sheet where you want this to happen and select View
Code. Then use something like below.
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A15").Value = 0 Then
ActiveSheet.Shapes(1).Visible = True
Else
ActiveSheet.Shapes(1).Visible = False
End If
End Sub

xavi garriga wrote:
Hi to all;

I need to do the following:

If a cell value is zero, a picture must appear. But if this cell's value is
different than zero; this picture has to disappear. How can I do this?
Suppose I want to do this without clicking any button, only changing the cell
value.

Is it possible?

Thanks to all;
--
atrep




All times are GMT +1. The time now is 12:27 AM.

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