VB Chart > Excel

I have a vb program that pulls data from a database and displays it
onscreen. This includes a chart - is there a quick way of bascially copying
this chart into an excel spreadsheet via code from my program? I have
already got my listboxes and so on to fill in their info onto a new blank
sheet, but the chart is also going to be handy.
I assume one way is to copy all the data from the chart to a hidden sheet
and use that maybe, but I am hoping I can do something simpler...
Ta,
James.


0
jamesb1 (1)
2/18/2004 2:49:40 PM
excel.charting 18370 articles. 0 followers. Follow

1 Replies
324 Views

Similar Articles

[PageSpeed] 56

James -

Make a template that has some dummy data and the chart you like, already 
formatted. Create a new file based on the template, not a completely 
blank one, overwrite the data, and reset the chart data ranges (or use 
dynamic ranges). If you want this in an existing workbook, copy the new 
sheet from the new file into the workbook.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

James wrote:

> I have a vb program that pulls data from a database and displays it
> onscreen. This includes a chart - is there a quick way of bascially copying
> this chart into an excel spreadsheet via code from my program? I have
> already got my listboxes and so on to fill in their info onto a new blank
> sheet, but the chart is also going to be handy.
> I assume one way is to copy all the data from the chart to a hidden sheet
> and use that maybe, but I am hoping I can do something simpler...
> Ta,
> James.
> 
> 

0
jonxlmvpNO (4558)
2/19/2004 4:08:58 PM
Reply:

Similar Artilces:

How chart time scale x-axis with another date serie
Hello all. I have this problem, I will need to create this chart that I don't know how to. Serie 1 is below which needs to be time scaled Date Count 1/1/2006 12 1/2/2006 3 1/3/2006 5 2/1/2006 18 2/3/2006 4 2/18/2006 9 4/1/2006 18 7/4/2006 38 Serie 2 - needs to plot the three dates in serie 1's time scaled X-Axis with symbols. 1/31/2006 2/18/2006 4/2/2006 I will look something like you have a line of count on a time-scaled chart, with 3 dates point in the x-axis. Please ...

Excel Regional Date Format Options
A client of ours in NZ is complaining that date format options for English (New Zealand) have changed from older versions of excel (they are using 2003) Some of their spreadsheets have dates formatted as dd-mmm-yy, mmm-yy and dddd,dd,mmm but these options do not exist anymore. Is there anyway to add options to this list without using the custom format option? Thanks, Jesse I just compared the Excel 97 and Excel 2003 built-in date formats and they are mostly unchanged. 2003 has a few more but I don't think there were any subtractions. The formats dd-mmm-yy and mmm-yy are righ...

MS Excel 2003 cannot auto calculate formula, need to press F9 each time
hi, I don't know why my excel 2003 new worksheet cannot auto calulate formula (eg. summation), i need to press F9 and it will refresh and show the new figure. there is "calculate" word at the left hand bottom of the screen. what is the likely reason ? it was running fine 2 weeks ago. any advise is greatly appreciated. rgds. Tools>Options>Calculation tab, check Automatic -- Kind regards, Niek Otten Microsoft MVP - Excel <sg_s123@yahoo.com.sg> wrote in message news:d5393a73-eb7d-4e08-8fab-5f4ab895f77a@e23g2000prf.googlegroups.com... | hi, | | I don't know w...

VB code for Macro
I have set up a rule on my InBox to check for specific words and move emails to my Work folder. Now I review emials in my Work folder and drag and drop them into 1 of 4 folders based on a number 1-4. After clicking on the folder, I need to perform the following on each of the four folders: Click on first email in the folder Clt+A (to select all the emails in the folder) Ctl+C (to copy) Drag the selections to a folder name HH Click #_Button (customized button set to send an email) Ctl+v (to paste the contents in the body of the email) Click Send Steps without the comments: Click folde...

Excel sheet truncated after copying to powerpoint slide
Hi, We are using Office 2000 with sp3. When we copy excel sheet to power point slide, some of the rows and colums are truncated. Also the font size is changed. We can see only some part of the sheet. Let me know if anybody faced this problem.. Thanks in advance Shekar. Debra Dalgleish posted this link that you may want to review: http://www.rdpslides.com/pptfaq/FAQ00068.htm Microsoft wrote: > > Hi, > > We are using Office 2000 with sp3. When we copy excel sheet to power point > slide, some of the rows and colums are truncated. Also the font size is > changed. We can s...

How to create a connection point in Excel
When I group autoshapes the group itself does not have connection points. A connector connects to one of the grouped shapes instead. So, the connector beginconnecedshape (or endconnectedshape) property contains the name of the contained shape and not the name of the group. Is there a way to create connection points for a group? Alternatively, is it possible to change a group into a single shape with connection points? ...

Count problems[Excel 97]
Hi there, I did a search on the forum to find an answer to my question but didn' find anything. Here is my prob : Lets say I got this page-> ___a___b_____c__d__ 1 Name Type Job bla 2 Name Type Job bla 3 Name Type Job bla 4 Name Type Job bla 5 Name Type Job bob I want a Cell to write how many row I got( 5 in this exemple) and onl count the cells with bla in the D column(4 in this exemple). Sorry if I'm not really clear but if you can help me feel free t answer :) thx, Tulkas -- Tulka -----------------------------------------------------------...

Viewing an Excel sheet w/out all the empty fields...
How do you create a spreadsheet that only shows the fileds with data in them? -How do you get rid of all the empty rows/columns, to ease viewing for those who are easily confused by excel spreadsheets? (I don't know how else to emaplin my question... I just don't want the extra columns & rows there, if that's possible...) Please help... Hi! >I just don't want the extra columns & rows there, if that's possible... Just hide them! Suppose the last column in your sheet that contains data is column H. You can hide columns I:IV so that after column H all you ...

Data from Access query to Excel
To pull data from an Access 2003 database, I have created the queries in Access, then import into Excel. The problem is that all the numbers that are pulled into Excel are text and need to convert them into numbers to run formulas on. I have converted a few sheets by hand, but, some have will over 50,000 rows. Is there a function to select all number colums (the colums are the same through out the sheets) and convert? Thanks There are instructions here for converting text to numbers: http://www.contextures.com/xlDataEntry03.html You can select all the columns, and only the num...

Excel question #9
Is there a way that I can transpose the order of the values in a cell? For example I have the values of 10.200.13.1 in a cell and I want to transpose(not sure if that is the correct term or not) the order of the values in the cell so that they appear as 1.13.200.10. thanks for any help as I have literally 4 pages of these kind of values that I have to flip. -- Brian blanktree at hotmail dot com Hi try the following user defined function from John Walkenbach's book Excel 2000 formulas (great resource by the way): Option Explicit Function REVERSETEXT(text) As String ' R...

How to view the code for excel built-in functions?
Is it possible? -For example the function PMT(). thanks. No, the code is compiled, so it would likely be less than useful anyway. About the best you can do is check out the equations used in Help (see "PV"). In article <OSU3OXOBGHA.1676@TK2MSFTNGP09.phx.gbl>, "serdar" <s@s.com> wrote: > Is it possible? -For example the function PMT(). > thanks. ...

Excel color palette missing colors
Opening a workbook with text formatted in color (orange) defaults to gray. Examination of the color palette shows that that shade of orange is missing from the palette itself. Exiting Excel and restarting it sometimes solves the problem. Text rendered in orange is orange again and the color swatch is back in the palette. User has tried rebooting the system too. ...

How do I convert time (hh:mm) to value ($$) in Excel?
Would like to calculate cost of time. Eg. Cost for production down time per minute is $100. Says production doen for 3.5 hrs, what is formula shall I apply in order to generate the cost (in $$). =3.5*60*100 "ahfen79" wrote: > Would like to calculate cost of time. Eg. Cost for production down time per > minute is $100. Says production doen for 3.5 hrs, what is formula shall I > apply in order to generate the cost (in $$). =(3.5/24)*60*100 -- Regards Dave Hawley www.ozgrid.com "ahfen79" <ahfen79@discussions.microsoft.com> wrote in ...

Where can I get UNLIMITED Excel stock qoutes?
The Excel Add-in that allows you to retrieve stock qoutes is limited in taht it only allows you to get about 250 qoutes at a time. How can I get unlimited qoutes in a format compatible with excel? Z There's a program called Historical Stock Quotes which can create tab or comma delimited files that can be read into Excel. If you want something that updates automatically within Excel, you may have to buy an add-in. Have you searched the web? On Sun, 6 Mar 2005 12:18:23 -0800, ZouBCivil <ZouBCivil@discussions.microsoft.com> wrote: >The Excel Add-in that allows you to retriev...

How to change default printing parameters on Excel & ......
How to change the default printing parameters on Excel & keep them changed for future workbooks. Example: Normally I use Printing margins 0.25 on all directions, but default printing margins are 0.75. I want to change them to set 0.25 as DEFAULT. If you start a new workbook and change the page layout (for all the sheets), you can save it into your XLStart folder as Book.xlt. Excel will use that as the basis for new workbooks. You can change a lot of settings that way--including orientation, headers/footers.... Amjad wrote: > > How to change the default printing parameters ...

Excel 'hangs' when deleting a row
when i delete a row in excel 2000, everything locks up! and when lookup at Task Manager/Processes, it's MEM USAGE goes up to 22K o more! i tried doing it in another file but i experienced no error. the dat is in LAN. all data are filtered when the deletion began. however i ca delete files before. please help, anyone.... -- Message posted from http://www.ExcelForum.com The best thing is to free up memory (assuming your file is large). Clos all applications you do not require at the time and any workbooks no in use. Dunca -- Message posted from http://www.ExcelForum.com ...

Windows XP: Open file in read-only: Word, Excel, Visio
I'm often sharing files on a network drive with someone. Often, one of us knows that we don't need to open a file for modification, and we only need read-access. Is there a way to open a file in read-only mode so that when someone does need to open it for modification, the read-only user is not blocking that? If there is not a way to do this native to Windows XP, is there a way to do it from the three applications that we use most, namely Word, Excel, Visio? All are 2003 versions. Thx. I used to save files like this in "read only recommended" mode. File|SaveAs|Tools|Ge...

Excel and NPV
Hi, I have a problem regarding the NPV function on Excel. Does anyone know how to use the function if the interest rate changes over a period of 20 years. Say for example, for the first 8 years the interest rate is 8%, then for the next 5 it's 12%, and for the last 7 it's 14%. It would be great if any one can me with this! thanks! As far as I can tell, there is no way you can vary the discount rate in the NPV function in Excel. In fact it is very difficult to model this in any calculation tool. Here is an interesting article which may help you see the difficulty; http://...

Paths to becoming an Excel Expert
Dear community I am a retired accountant, and have used Excel for many years, including power user, macro and VBA development. I would like to specialise in this field + maybe delivering Excel training, maybe offering my services as a freelance. What is the best path to develop this expertise? Is there a worthwhile Microsoft Certification route - which I find confusing? And finally is it worth sticking with VBA which seems to be on the back burner now? Thanks for any suggestions. First, some links to several "Excel Experts" www.chandoo.org www.peltiertech.co...

Using a variable for a chart limit
Since I got instant help on my last query, is there any way to use a cell reference as an axis minimum or maximum in format axis? It seems impossible, but there is a lot of experience out there. Thanks in advance. -- Vince F Hi, See Jon's information http://peltiertech.com/Excel/Charts/AxisScaleLinkToSheet.html Cheers Andy Vince F wrote: > Since I got instant help on my last query, is there any way to use a cell > reference as an axis minimum or maximum in format axis? It seems impossible, > but there is a lot of experience out there. Thanks in advance. -- Andy Pop...

autoformatting issues in excel
How do I input '12-1' in excel without it autoformatting my input to '1-Dec'? Precede entry with apostrophe ' Regards, Peo Sjoblom "student" wrote: > How do I input '12-1' in excel without it autoformatting my input to '1-Dec'? ...

Excel (Office Home & Student 2007)
Question 1. Can I have an Excel Spreadsheet sort alphabetically? How? Question 2. Does anyone know where the updates are for Office? Thanks in advance. Dave __________ Information from ESET NOD32 Antivirus, version of virus signature database 5046 (20100421) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com Please see "Sort" and "Updates" in Excel Help. Either press F1 or click on the little white and blue question mark in the upper right corner. David Dyke wrote: > Question 1. Can I have an Excel Spr...

highlighting rows in excel
I've got the following type of data: id name address postcode 1 davie london lon34 1 davo glasgow ga23 3 tester manchester ma45 3 tas sfdfs sdfs 4 adssf 4asfd sf 4 dfsdf sdfsdf sdfh44 How can I highlight the rows with 1, 1, 3, 3, and 4,4 with alternating background colours? for example the first match would be blue(1,1) the second match would be yellow(2,2) the third match would switch back to blue (3...

Open excel file
Hi, I want to open excel file using a commnad button placed in a form. I have read the other questions to this to use runapplication. But, what I am looking for is as follows: i have tax database which contain the taxpayer name, taxyear and the Taxid number. I have placed this table in a form. The tax caluclations are made in excel and stored in a particular folder say named, Tax_comp and with filenames Taxpayer_year.xlsx. I want to place a command button on the form, and when the user clicks the command button, i want the particular tax payer excel tax computation file sto...

Cell background shading in Excel
Why is it that the background shading colors available under the Paintbucket Icon chjange from file to file? Also, how can I add some of the colors to the paintbucket that are availabe under the format/cells/pattern pulldown? Colors are a Workbook-level property, so you can change the color palette for any workbook. Choose Tools/Options/Colors... and modify the colors to your hearts' content. You can also import another workbook's color palette from that dialog. Note however, that there are only 56 bins in the color palette, so you can only use 56 colors at a time. The paint b...