Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello All
Help! I have been trying to work out a simple way to see whether a particular chart is present on the ACTIVE WORKSHEET prior to running an IF ... THEN statement. The basic code is below. I need the method to check that Chart 3 exists or not. (There are 2 other charts on the worksheet). If it exists, then based on the second criteria, it will either delete the chart or adapt the scale of the chart to better fit the data. Can you help guru's? ------------------------------- Lets call the Chart "3" Sub UpdateScale_Chart() IF <<<Here is where I need to add in the test THEN <<< TERMINATE ElseIf Worksheets("Data").Range("B34") < "CCSP" Then ActiveSheet.ChartObjects("Chart 3").Delete Else ActiveSheet.ChartObjects("Chart 3").Activate With ActiveChart.Axes(xlValue) ..MinimumScale = Range("Alpha!D73").Value ..MaximumScale = Range("Alpha!D74").Value End With End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Putting Command Buttons on a Chart Sheet | Charts and Charting in Excel | |||
Urgent Chart Assistance | Charts and Charting in Excel | |||
Urgent Chart Questions | Excel Discussion (Misc queries) | |||
Urgent Chart Assistance Requested | Excel Discussion (Misc queries) | |||
Simple chart | Charts and Charting in Excel |