chart #4

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


0
suyves (1)
11/28/2003 2:04:36 PM
excel.charting 18370 articles. 0 followers. Follow

1 Replies
676 Views

Similar Articles

[PageSpeed] 4

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
_______

Yves Janssens wrote:
> 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
> 
> 

0
11/28/2003 5:18:03 PM
Reply:

Similar Artilces:

Flow chart objects not visible in Excel spreadsheet.
When trying to create a flow chart in an Excel spreadsheet, the lines of the objects do not stay visible. They are there when I create them but as I move through creating the rest of the chart the earlier ones become invisible. If I save and close my file, all the object lines are invisible when I re-open the file. ...

Excel Y-axis and chart info during setup
I'm trying to design a chart using data I have in a spreadsheet. The info I want in the chart doesn't show up as I want it with the info in the spreadsheet. For example, I have two diff. amounts I want to display in a chart. Only one of the required amounts shows up on the chart. If anyone has any suggestions to solve this problem, please respond ASAP. This project has a Friday deadline. On Wed, 29 Oct 2003 11:48:48 -0800, Erika <egraves@brownrigg.com> wrote:= > I'm trying to design a chart using data I have in a > spreadsheet. > > The info I want in...

How to add pattern to the shape styles for charts in Excel 2007
I was wondering if somebody could help me. I just switched from Microsoft Office 2003 to Microsoft Office 2007. In Excel 2003 when I was making charts I used to be able to fill in bars with patterns. It appears that there is no such function in 2007 version. Does anyone know if I can add this function (it is still there in shape formatting section)? Thank you. Galina. Hi, I have an addin that exposes a gui in order to do patterns in charts and shapes. http://www.andypope.info/charts/patternfills.htm I did not think patterns where accessible even when dealing with shapes. Cheers Andy ...

Changing font style/size/color/etc for multiple series in a chart?
I have a stacked bar chart (but note applies to all charts) that I have added data labels to in Excel 2007. However, the data labels are the wrong font size and color. When I go to format data labels in the "Labels" section of the Chart Tools/Layout ribbon, there is no apparent option to change font. I can right click on a single series and change it, but doing that for every series in a complex chart seems ludicrous. Is there any way to change the font for multiple series in one step? The same holds true for changing the number format or any other characteristic for m...

Pivot Table question #4
Hi I have spreadsheets that take data via a pivot table from an OLAP cube that is held on a terminal server. The spreadsheets hold figures entered by me and figures obtain from the pivot table. I want to enable the automatic update on the pivot table but the pivot table is sorted by a project number obtained from the OLAP cube. My problem is if a new project is added to the OLAP cube then it is automatically selected from the drop down list. I want to be able to turn this off so that it only selects the project I have previously chosed. For example if I have selected the filter nu...

Need large gap in chart
I am making a line graph with 2 sets of numbers that are very far apart - one set of numbers is around 7000 to 8000, and the other set is closer to 80,000. Of course, I get one line at the top of the chart that is pretty easy to read, but the line on the bottom that represents the smaller numbers is just TINY and looks pretty much straight. My question is this: is there a way to put a "break" into the graph between the smaller numbered data and the larger ones so they are all easier to read? Like a jagged line showing where the jump occurs or something? Hi, Jon has an exampl...

Excel 2007
When you set reverse categories for the horizontal axis, I noticed that the legend (which I normally placed at the bottom of the chart), did not correspondingly reverse. Is this WAD (working as designed) ? If not, how can i overcome this as the reader would have to mentally "remap" the legend to the bar chart. Thanks very much. Hi, Reversing the Axis categories will not effect the legend order. To do that you need to change the Series Order. In 2007 this is none via the Select Data Source dialog. Chart Tools > Design > Data > Select Data. Use the Up/Down arrows in the...

CRM 4 workflow picklists
We have been creating workflows in CRM 4 to create an opportunity when a field is changed on a lead. In general this has not been an issue (and much easier then in CRM 3!) expect I have an issue with custom picklists. I have a pick list on the lead, and a picklist on the opportunity with the same values. Using the create entity step in the workflow manager I can not set the picklist value on the opportunity to the value on the lead. When trying to set a picklist it only lets me use a dynamic value of an identical picklist. Is there anyway I can tell the system that the picklist on the L...

Display order of Bar Chart
How do I get a bar chart to display my data in the order I created it rather then in a sort ascending or descending order. I created my vertical axis categories in the exact order I want the bar chart to display the data however, when the chart is created is rearranged into ascending order of the data not in the order of the categories as I developed it. That is not how Excel behaves; when the data is in rows, the first category of the first row is at the bottom of the bar chart and so on, regardless of the y-values best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.s...

ASP.Net 4 TreeView Collapses on Node Click
I have an ASP.Net 4 TreeView that's being populated by a SQLSiteMapProvider and sits on a MasterPage. When I click a node the tree collapses. EnableViewState is set to True ViewStateMode is set to Enabled Am I missing something? How do I keep the tree state as it is when I click a link? "Dave" <Dave.Burkett@Jacobs.com> wrote in message news:2038c0ba-5328-4138-b615-777e02975478@c7g2000vbc.googlegroups.com... > Am I missing something? How do I keep the tree state as it is when I > click a link? This "feature" has always been there and I...

Chart
Hello, I created a line column chart on 2 axis. I have four data sets. The first 3 should go on the primary Y axis as columns and the 4th should go on the secondary Y axis as a line. However, Excel wants to automatically put both the 3rd and 4th data sets on the secondary axis as lines. I cannot find any command to change the 3rd data set to go onto the primary axis as a column. Any suggestions would be most appreciated! -Patty On Tue, 11 Nov 2003 13:27:33 -0800, Patty = <anonymous@discussions.microsoft.com> wrote: > Hello, > > I created a line column chart on 2 ...

Gantt Chart Missing One Task Line When Printed
Hello! I am completely stumped here with Project 2007. When printing the gantt chart line 30 of my plan is blank. The line number is there, but the task info and bar is blank. It shows up in print preview. All other lines show up fine and the rest of the project prints fine as per my print settings - just missing one line! Printer drivers are updated, software has current update - anyone ever heard of this? I really appreciate your help! Hi Jean, Do you see a different answer if you turn off 3D bars? Tools > Options, View tab. There were some early problems with 3D ...

Charts and "global" changes
Hello all, I'm actually working in Microsoft Access97, which uses MSGraph 2000 for charting, so I thought this was really a "charting" question... not an Access question. I have an XY scatter chart (using just points... no X or Y error bars or lines) all laid out just fine, but I have a couple of questions that would make my work a lot easier. When the data first displayed on the chart, every data point had a different "style"... circles, triangles, x's, etc... I had to go into every one individually and change them to a black dot at size 3. Isn...

NewsMaestro Usenet Supertool v. 4.4.8 for Windows/Linux/Unix released
Download page: http://rapidshare.com/files/118192521/NewsMaestro_4.4.8_Src.zip (Hit Free button to download. For some download managers you need to open the .html file it downloaded to do actual download.) * Documentation update. * Bug fix in Archive 2 HTML generator while doing ReChapter. News Maestro is a power tool for usenet that automatically performs any standard Usenet operation, as specified in various RFCs, individually, or in bulk, on any number of groups and articles, utilizing sophisticated filters to select the articles to be processed. As an automated tool to do anything you...

Splitting multiple cell contents from 1st column into 4 columns
n my first column I have 4 cells (1-4) (5-8) etc. with general content. The content from each of these 4 cells needs to be placed in a separate column to make a list that I can sort etc. Example: COLUMN A 1 01-04-425-001 2 Heatherridge Road #301 3 Harry Smith 4 H25 Condo Fairfax Place 5 01-05-356-041 6 McGrath Street # 56 7 Mary Jones 8 B45 Condo Lemon Circle . . . . . . and so on and so on every 4 cells. I have hundreds of 4 cell descriptions. I just can't do this one by one. Can anyone help, PLEASE, PLEASE. I am really a novice at Excel though I use it for e...

MFC #4
How to work in MFC without using Wizard ...

Pie chart
Is there an pie chart type where you can explode just one of the sets of data on the chart? I have access to both Excel/Powerpoint 97 and 2003, but there doesn't appear to be any differences in what's available for pie charts. Is there an add-in or something for variations on these pie or other charts. Thanks for your thoughts or suggestions. Diana Create a regular pie chart in Excel Click on the pie to select it (each slice will have a black handle on its outer edge) Click on the slice that you want to explode (only that slice will now have handles) Drag out the select...

Setting series values on Excel Chart
Hi I'm struggling very hard in getting beyond this error when trying to use VB to generate a chart from data previously inserted into the sheet. Unable to set the Values property of the Series class. The code works absolutely fine in XL2007 but I am having to port it back to 2003 and the inference is that its empty values that cause it to hiccup - something I cannot avoid. My code is: 1. Retrieve selected data from database and place it at the top of the sheet 2. Add The Chart 3. Iterate through the data (amount can be variable depending upon user inputs) For j as i...

How do I pass series data x-value range to a chart from a cell?
I have a series on a line chart (x-values "=Sheet1!$A$1:$A$10"). I also have two worksheet cells (B1 & B2) that contain the start and end date for the x-axis of the chart. I want to be able to link the chart series data to the start and end date values so that the chart automatically adjusts when I change the dates in the worksheet cells. I can create a string or address for the x-values but how do I do not know how to pass this to the chart series?? I know I can do this using a macro, but I want to do it without macros so that friends who use MicrosoftCharts (the cheap, n...

sizing a chart
Two Questions: (1) I have two charts that are exactly the same just showing different data. Is there an easy way to make these charts the exact same size? (2) How can I get them to line up with border lines I have on my worksheet so that they look right on the printout? Thanks in advance for any help or suggestions you may have. Hold the Alt key while moving and resizing the charts, and they will stick to the cell boundaries. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jordan" <Jordan@discussions.microsof...

How do I create a 4-d chart?
I am trying to create a chart with 4 dimensions. In effect, I need a 3-D column chart where the vertical bars are "stacked" colmns. How can I do this? Evanr Have you heard about Tufte's "small multiples" or Cleveland's "trellis" displays? These approaches create a series of small plots instead of trying to put everything into a single overly complex chart. I would stay away form 3D charts in Excel. Trellis is a trademarked by Insightful software. I use the term "panel charts" to reflect trellis and small multiple charts in Excel. I have...

Release Date of V 4.0
Hi Does any one know the official release date for CRM V 4.0? Will CRM V 4.0 be available for partners before it is available for the general public? Thanks alot ...

Equation in a chart
Dear all There is any possibility to add in the area of a chart a box or a text box or another way and to make it with a simple = to bring me a value of a cell? either a number or a percentage? I currently using Excel XP edition Thanks in advance Manos Hi try the following: - insert this textbox - select the textbox and hit F (to get into the formula bar) - now enter your formula. e.g. ='sheet1'!A1 -- Regards Frank Kabel Frankfurt, Germany Manos wrote: > Dear all > > There is any possibility to add in the area of a chart a > box or a text box or another way and...

Outlook Web Access problem #4
When checking e-mail through Outlook Web Access (Exchange 2003) in Internet Explorer 6.0, the messages show up fine, but folder icons appear with no text beside them and none of the menus (new, reply, send, etc) show up - in main window or when opening an e-mail message. What can be done to fix this? Does this happen for ALL users, or a specific few? Kris >-----Original Message----- >When checking e-mail through Outlook Web Access (Exchange >2003) in Internet Explorer 6.0, the messages show up >fine, but folder icons appear with no text beside them >and none of the...

Windows Update Agent 7.4.7600.226 11-25-09
Note: This question was posed to the vista.general group with no responses offered. My Dell Inspiron 1520 laptop with Windows Vista Home Premium has failed to load the subject update on 20 different occasions since 13Nov09. The "Error Details" is Code 80073712, which is nothing more than a general error code with no specific fixes recommended. I have also tried the manual workaround from the Window Help site as well as the Window Update Fix-It application to no avail. Anybody have an idea as to how to resolve this issue? I have found the following tool to be he...