Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Can't activate chart

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Smith - 20 Jan 2006 18:45 GMT
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
Dave Peterson - 20 Jan 2006 19:36 GMT
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...

> Hopefully someone knows this one quickly,..if so please help
>
[quoted text clipped - 10 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.