LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Checking to see that a CHART exists prior to running a simple command

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Putting Command Buttons on a Chart Sheet Kremlin Charts and Charting in Excel 2 May 11th 05 01:06 PM
Urgent Chart Assistance Brent E Charts and Charting in Excel 1 May 10th 05 09:09 AM
Urgent Chart Questions Brent E Excel Discussion (Misc queries) 0 May 9th 05 11:01 PM
Urgent Chart Assistance Requested Brent E Excel Discussion (Misc queries) 0 May 9th 05 11:01 PM
Simple chart TomC Charts and Charting in Excel 3 May 5th 05 01:31 AM


All times are GMT +1. The time now is 11:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"