473,766 Members | 2,060 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Excel Charts

2 New Member
Hi, does anybody know how to set a title to a chart created from vb
here's my code
Expand|Select|Wrap|Line Numbers
  1. ....
  2.         Dim graficos As Excel.ChartObjects = CType(hoja1.ChartObjects(), Excel.ChartObjects)
  3.  
  4.         Dim objgrafico As Excel.ChartObject = graficos.Add(100, 50, 500, 300)
  5.         Dim grafico As Excel.Chart = objgrafico.Chart
  6.  
  7.         grafico.ChartType = Excel.XlChartType.xl3DPie
  8.         Dim rango As Excel.Range
  9.         rango = hoja1.Range(hoja1.Cells(2, 1), hoja1.Cells(ret(0).Count + 1, 2))
  10.         grafico.SetSourceData(Source:=rango, PlotBy:=Excel.XlRowCol.xlColumns)
  11.  
also it would be helpful if somebody could tell me how to show the legendkeys and the values of the chart

thx
meee
Aug 10 '07 #1
2 1299
PritiVinay
2 New Member
hi
U can do following steps
chartobject.Axe s(xlValue).Axis Title.Select
chartobject.Axe s(xlValue).Axis Title.Text = yAxis

same for xaxis
chartobject.Cha rtTitle.Text = charttitle

Priti


Hi, does anybody know how to set a title to a chart created from vb
here's my code
Expand|Select|Wrap|Line Numbers
  1. ....
  2.         Dim graficos As Excel.ChartObjects = CType(hoja1.ChartObjects(), Excel.ChartObjects)
  3.  
  4.         Dim objgrafico As Excel.ChartObject = graficos.Add(100, 50, 500, 300)
  5.         Dim grafico As Excel.Chart = objgrafico.Chart
  6.  
  7.         grafico.ChartType = Excel.XlChartType.xl3DPie
  8.         Dim rango As Excel.Range
  9.         rango = hoja1.Range(hoja1.Cells(2, 1), hoja1.Cells(ret(0).Count + 1, 2))
  10.         grafico.SetSourceData(Source:=rango, PlotBy:=Excel.XlRowCol.xlColumns)
  11.  
also it would be helpful if somebody could tell me how to show the legendkeys and the values of the chart

thx
meee
Aug 13 '07 #2
zer0gg
2 New Member
thx Priti, i tried
Expand|Select|Wrap|Line Numbers
  1. chartobject.ChartTitle.Text = charttitle
but it seems it just a read property, any other idea???

zer0gg

hi
U can do following steps
chartobject.Axe s(xlValue).Axis Title.Select
chartobject.Axe s(xlValue).Axis Title.Text = yAxis

same for xaxis
chartobject.Cha rtTitle.Text = charttitle

Priti
Aug 14 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3228
by: ian castleden | last post by:
From time to time I see requests for some sort of python MS Excel interface/software. I have written just such software 100% python (works with Jython too! at least it did a year ago). It was once based (shamelessly) on the the Perl equivalent but now has gone its own way. It has been used in anger (i.e. people once payed me money to use it :-) and includes both generation and scaning of Excel files. There's even some documentation for...
0
2304
by: mscir | last post by:
Date: Thu, 08 Jul 2004 17:02:27 -0700 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <10ero4l3kp2qa65@corp.supernews.com> Reply-To: mscir@usa.com User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@supernews.com
10
5597
by: Mark Day | last post by:
Hi All, I am using Access 2000 to generate over 40 Excel charts and pivot tables using early binding to the Excel 9.0 object library. I am finding that if I show the Excel object while processing the charts, the whole process completes in around 2 minutes. However if I hide the Excel object the same process takes around 27 minutes to complete. I have played around with screen updating and this makes no real difference to the time. Does...
0
12416
by: Rach | last post by:
Hi, Does anyone know how to export charts/graphs from EXCEl into Powerpoint-Microsoft Charts though VBA code. I would like to import the underlying data with the chart as well. I know we can paste as an Excel object in power point which links the Excel file to the power point, but this increases the file size. Microsoft Power point has a feature called Microsoft charts that allows to create charts and graphs in
1
2575
by: Randall Arnold | last post by:
I'm converting a vbscript program to vb.net. Witht he exception of .net idiosyncrasies, most of it is working well with the same code. My only problem is that some properties and methods are missing from the Chart object. For instance, the following line worked fine in vbscript (csPowerSpeed is the chart): objXL.csPowerSpeed.seriescollection.newseries() However, in VS.Net, newseries is no longer avaialable as a method for series...
5
2379
by: Takeadoe | last post by:
I'm doubtful that the group is unbiased, but I will ask anyhow :o). If one intends to plot lots of data, primarily XY line and scatter plots, and mass produce them (in many cases I will be doing 88 graphs at a time - 1 for each of 88 counties), will Exel be the best bet, or is Access equally capable? I might mention that in time, I will be moving all of my data into Access databases. I'm slowing learning charting and automation in...
3
13606
by: implicate_order | last post by:
Greetings, I'm new to python and am in the process of writing a script to parse some CSV data, spread it across multiple Excel worksheets and then generate charts. I searched the internet to find some place where I could look up a HOWTO doc/recipe to do that using either pyExcelerator or win32com.client. Could someone point me in the right direction? I'm at the stage where the spreadsheet and associated data worksheets
3
3252
by: saragoesnuts | last post by:
I have a program that automates to Excel with information in tables. I want to add charts to the excel file (pie charts, bar charts, etc). Is this possible?
0
2176
by: eolmos | last post by:
Hello everyone, I am currently working on a project that requires a webform in asp.net using C# as the code behind. The page must allow the user to create a report in excel. This report must also generate a chart based on the input dataset. (By the way, the component must be free) So far, I have tried a lot of components which are really good but they do not provide all the required functionality altogether and some of them have trade offs when...
9
3259
by: AGP | last post by:
I have a VB6 application that has an OLE container with an embedded Excel chart. Our office updated to Excel 2007 and now although the app works the charts looks like crap. Since the app is fairly large my goal is to keep the devlopement in VB6 but am open to any ideas or suggestions. What i want to do is: 1. Keep my app in VB6 and find a workaround for the crappy looking charts. the charts now look very blocky and the grid lines and...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9837
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5279
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.