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 / Charting / November 2003

Tip: Looking for answers? Try searching our database.

chart

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Yves Janssens - 28 Nov 2003 14:04 GMT
All,

With VBA I'm making a chart sheet.
This chart sheet is than viewed by the user. I have protected this sheet, so
he can make no changes.
I have also set some settings for the graph options:
   Application.ShowChartTipNames = False
   Application.ShowChartTipValues = False

Now I notice that you can still select the different parts of the graph.
Is it possible to switch this off?

I also would like to add a button on this chart sheet. I tried this with:
      ActiveSheet.Buttons.Add(869189.25, 125211.75, 395520.75,
289965).Select
   ActiveChart.Shapes("Button 1").Select
   Selection.Characters.Text = "Print"

But when I ran the code I don't see any button. What do I wrong?

Thanks a lot in advance,

Yves
Jon Peltier - 28 Nov 2003 17:18 GMT
Yves -

To prevent selection of the chart elements, use this:

  activechart.ProtectSelection=True

Why can't you see the button?

?activesheet.chartarea.width
 675
?activesheet.chartarea.height
 459

You are asking for a huge button (395520.75 points wide, 289965 points
high) far below (869189.25 points) and to the right (125211.75 points)
of the chart, which is only 675x459 points in size (6-3/8 by 9-3/8
inches).  This gave me a button where I could see it:

    ActiveChart.Buttons.Add(10, 50, 100, 25).Select
    Selection.Characters.Text = "Print"

You can't add a button if the chart is protected, so unprotect the
chart, add the button, then protect the chart.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

> All,
>
[quoted text clipped - 19 lines]
>
> Yves
 
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



©2009 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.