View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron Coderre[_2_] Ron Coderre[_2_] is offline
external usenet poster
 
Posts: 29
Default =IF(B3<O;nodisplay(graphA);display(graphA))

First, you can manually name a chart by:
1)Select a cell on the same sheet as the chart
2)Hold the [Ctrl] key and select the chart
The name box in the upper left will display the current chart name (Chart1,
etc).

3)In that name box, type the new name for the chart (example: myChart).

Next, hiding the chart if Cell B3 is less than zero:
Try this code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("B3") < 0 Then
ActiveSheet.ChartObjects("myChart").Visible = False
Else
ActiveSheet.ChartObjects("myChart").Visible = True
End If

End Sub

Does that help?

Regards,
Ron