View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Can't activate chart

Option Explicit
Sub testme()

Dim wks As Worksheet
Set wks = ActiveSheet
With wks
If .ChartObjects.Count 0 Then
.ChartObjects(1).Activate
End If
End With
End Sub

maybe...

Michael Smith wrote:

Hopefully someone knows this one quickly,..if so please help

This line fails when i run my macro, however when I step through line by
line, the macro works.

ActiveSheet.ChartObjects("Chart 1").Activate

Is there anyway to say..."active the chart that exists on this
worksheet"..is that the way to do it?

Thanks,
Mike

*** Sent via Developersdex http://www.developersdex.com ***


--

Dave Peterson