How to find a Chart embedded in a Sheet?
Hi Gilroy -
Not sure if this completely answers your question, but to get to a chart
embedded in a worksheet (as you have here), you'll want to go through the
ChartObjects collection of the Worksheet object. For example, the following
code will get you the last Chart on the active worksheet (if there are more
than one)
Dim mychart As Chart
Dim icount As Integer
icount = ActiveSheet.ChartObjects.Count
If icount 0 Then
Set mychart = ActiveSheet.ChartObjects(icount).Chart
MsgBox CStr(mychart.ChartType)
End If
|