How to customize error bars by VB code?

Hello NG,

from a Visual Basic (6) project, I need to customize the error bar of a
chart, to get a different value for each data point.

In Excel, this is done with a range reference:

ActiveChart.SeriesCollection(1).ErrorBar Direction:=xlY, Include:= _
  xlPlusValues, Type:=xlCustom, Amount:="=Hoja1!R1C3:R2C3"

but I need to do this by VB code, in order to control a OLE-Chart.
Reference to the datasheet-range is not working:

oGraph.SeriesCollection(1).ErrorBar Direction:=xlY, Include:=xlBoth, _
  Type:=xlCustom, Amount:=oGraph.Application.DataSheet.Range("A1:A3")

Any ideas?

Thanks in advance

Miguel

0
5/31/2005 4:42:31 PM
excel.charting 18370 articles. 0 followers. Follow

1 Replies
651 Views

Similar Articles

[PageSpeed] 24

MS Graph, while similar to XL, doesn't support the full capabilities of 
XL.  Custom error bars is one of the features supported by XL but not 
by Graph.

-- 
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article <1117557751.417875.286980@z14g2000cwz.googlegroups.com>, 
mperez1508@yahoo.com says...
> Hello NG,
> 
> from a Visual Basic (6) project, I need to customize the error bar of a
> chart, to get a different value for each data point.
> 
> In Excel, this is done with a range reference:
> 
> ActiveChart.SeriesCollection(1).ErrorBar Direction:=xlY, Include:= _
>   xlPlusValues, Type:=xlCustom, Amount:="=Hoja1!R1C3:R2C3"
> 
> but I need to do this by VB code, in order to control a OLE-Chart.
> Reference to the datasheet-range is not working:
> 
> oGraph.SeriesCollection(1).ErrorBar Direction:=xlY, Include:=xlBoth, _
>   Type:=xlCustom, Amount:=oGraph.Application.DataSheet.Range("A1:A3")
> 
> Any ideas?
> 
> Thanks in advance
> 
> Miguel
> 
> 
0
5/31/2005 6:55:04 PM
Reply:

Similar Artilces:

Roaming Office Errors for Network Users
We have had ongoing issues with Word and Excel, both v.X and 2004. In Word, the problem is usually a Disk Full error, with Excel it is usually a Document not Saved error when the user saves. Our users are network accounts on Xserves running 10.4.9 and clients are both PPC and X86 Macs, running 10.4.7 - 10.4.9. All user IDs are unique and managed via Open Directory. The problems arise typically after the user has been working with the file for some time. In the Word situation, the error pops up unexpectedly, while the Excel error only pops up on a save. In both cases, Word and Excel f...

errors
hello group I lost my main identify after i crashed outlook express sp1 and i cant get it configured . I used the configure E-Mail link but it Did not work. I get errors ox800ccc34 when outlook opens and error ox8004207 when i click receive all. Thank you ED ...

PWA error: unexpected error occured
Hi, I have imported my servers into Hyper-V for test environment, and now everything is up but I cannot access pwa.. it gives me the error 'unexpected error occured' This is a multi-part message in MIME format. ------=_NextPart_000_00A3_01CAE797.5EEA45D0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi Zozo, Try posting on the microsoft.public.project.server newsgroup (forum). = Please see FAQ Item: 24. Project Newsgroups. FAQs, companion products = and other useful Project information can be seen at this...

Outlook 98 Advanced Find error
When I perform an Advanced Find I receive the error "Outlook cannot perform your search. Outlook cannot display the view. The folder already exists." Any suggestions on how to resolve this? Amanda Minneapolis ...

Counting occurences of codes in cells
I have a spreadsheet with various codes separated by periods, in a single cell. Like: C T C,R T,C,R R and so forth. It's easy to count the single codes but how do I cound the "C" when it's with another character? There must be a simple way, without writing code, to do this. Is there? Thanks! maybe... =countif(a1:a10,"*" & "c" & "*") or =countif(a1:a10,"*c*") or if x99 contained the letter c. =countif(a1:a10,"*" & x99 & "*") salgud wrote: > > I have a spreadsheet with various codes separa...

scroll bar movement
When I grab and move the scroll bar the cells do not move until I release the bar. How do I make the cells scroll with the bar? I am using Excell 2000. It's annoying (use 2k at home), but that's the way it is. BTW - '03 (at work) doesn't have the problem (don't know about intervening version(s)). -- Regards; Rob ------------------------------------------------------------------------ "Jeff Ashcraft" <Jeff Ashcraft@discussions.microsoft.com> wrote in message news:22E41629-5380-4A3B-85D5-10D37FBC85BD@microsoft.com... > When I grab and move the scroll ba...

mswrd632 converter error
Just a thought. Can you convert the 2003 word files into Adobe pdf files and then open them? Also, I heard a blurb on Bloomberg News that Microsoft had lost a law suite to a Canadian firm for the rights to a piece of software they used in Word. Could this be the problem? On Tue, 05 Jan 2010 12:06:35 -0800, Shiela <user@msgroups.net/> wrote: >Just a thought. Can you convert the 2003 word files into Adobe pdf files and then open them? Also, I heard a blurb on Bloomberg News that Microsoft had lost a law suite to a Canadian firm for the rights to a piece of software they used in ...

Code stops for one user, like it has a breakpoint
I have a user where the code stops at this line like it has a breakpoint, but it doesn't. There is no issue on my system. myUserName = Environ("USERNAME") When the user presses F5, it continues to run. Has anyone seen this and what do I need it to do to run without stopping? Thanks, Barb Reinhardt Barb The only thing that stikes me about this is the case. I run several files in here that are used by about 50 people every days. Environ("UserName") has never given us a problem (note the use of Proper Case rather than your UPPER). -- ...

Problem with code that inspects thread context and dumps stack trace
Hi! Some years ago, I had to debug a Java application that had a deadlock problem. It wasn't so hard, because I've been told about a JVM command (now, I don't even remember how to activate it!) that dumps the status of all threads in an app, including "what they are waiting for" (locks). Now I'm in the "real" world of C++, Win32 applications and MFC (no virtual machines around!). We have many multithreaded applications: what if some bug causes a dedlock, e.g. in a test scenario? We must inspect it, and I'd like to have a tool to simplify my life. Does s...

#VALUE! error
I'm sorry but I added to this formula and it started with the #VALUE! again. The error goes away once I enter data. It's just so tacky looking seeing all these error messages. Please help! =IF(OR(B3="",D3="",B3>D3),"",'Tank Sizes'!$F$15)*(2/98)*F3/D3 You have your closing parenthesis for the IF function right after the "$F$15 reference which means the division by D3 is not controlled by the IF function's testing for D3="". I think moving the parenthesis to the end of the calculation will yield the result you want... =IF(O...

Error 425. Printer is locked
"Error 425. Printer is locked and cannot be accessed." Anyone know what causes this error? I have only the SO POS software running, and I also have the option in Configuration->Options set to share OPOS printers setting. Printer works in the Epson OPOS "check healthtouch" test. Hi, I have this same problem, and I don't have a solution. Have You found a solution for this error, 425? It is urgent, for me. Thanx in advance... Antonijo -- ADTodorovik "craiga" wrote: > "Error 425. Printer is locked and cannot be accessed." > >...

Is this error exchange 2003 based?
HI, I have a ecommerce package that after I submit the form, it usually sends an email, I recenlty moved this site to a new server with Exchange and now when I try and submit, I get this. Exchange 2003 and the website are both on the same W2k3 server. error '8004020f' /ssl/SFLib/mail.asp, line 311 Thanks David Also, In IIS would the application Pool be ExchangeAppPool or the DefaultAppPool being that this program uses CDOSYS. Thanks much "David" <dross@si.rr.com> wrote in message news:#6m611lsEHA.1344@TK2MSFTNGP10.phx.gbl... > HI, I have a ecommerce package ...

Error in coding going from one computer to another.
I have a database that works great on my laptop where it was created. I placed it on our server but I am the only one who can access and work with it. Everyone else gets an error for the String. Any suggestions? This is the actual error: Private Sub Combo230_AfterUpdate() ' Find the record that matches the control. Dim rs As Object Set rs = Me.Recordset.Clone rs.FindFirst "[Quality Plan ID] = " & Str(Nz(Me![Combo230], 0)) If Not rs.EOF Then Me.Bookmark = rs.Bookmark End Sub where ther error is at 'Str'. Thank you Dyper How about telling us t...

Problems with customizing styles in the Tracking Gantt
Hi, I want to modify the appearance of critical tasks in the Tracking Gantt but somehow it doesn't work. When I open the Bar Styles dialog, I select the first row (Show for "Normal, Critical" tasks, From - Start, To - Finish). I want to change the default pattern to be tick since when I print the chart the critical tasks almost do not appear. However, when I choose another pattern nothing changes. There is another funny thing. When I double-click a particular task, I see under the Bar Text tab that it shows Baseline Duration to the left and % Complete to the right....

Crystal Error with Stored Procedures
Failed to Load Database Information (ERROR) We got this message when we tried placing the Crystal Report we created onto MSCRM. We tried this on several machines via Crystal and Query Analyzer and it works.. We created our own Stored Procedures for to manipulate the MSCRM data (unsupported).. which was what our local MS Support suggested, now they realized that this was unsupported and wouldn't want to help us out. The Crystal Report we created creates temporary tables which are used by Crystal for some of the fields on the report.. this works fine on Crystal, but we get an error ...

Export messages error while initializing NAPI.
Greetings, I am trying to export my messages from one box to a new one. I click File>Export>Message> I get, 'This will export messages from = Outlook Express to Microsoft Outlook or Microsoft Exchange.' Click OK, and I get this error message, 'The export could not be = performed. An error occurred while initializing MAPI.' Using Outlook Express 6. Windows 2000 Pro. Thank for any help. W. Kirk Crawford Rochester Hills, Michigan Do you have Outlook installed? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All un...

Solver internal error sensitivity report
Hello, I use the solver add-in in the German version of Excel 2007. When I try to generate sensitivity reports I get an error message: unexpected internal error. The generation works once when I uninstall and re-install the add-in. Obviously it is not an option to re-install the add-in for each sensitivity report... Any ideas what the cause may be? Any suggestions how to solve the issue? Thanks. Patrick ...

How to resolve error This transaction is being edited by another u
Hi, We are attempting to open a Document Number in the Job Quote Entry Window (3rd party app I believe by Wennsoft or BSP) within Great Plains. When trying to pull up a specific Job Quote (Document Number) we get the following error message: "This transaction is being edited by another user" After doing some research on KB, I found this kind of error is common in standard GP windows like SOP or POP. The solution seems to be to run the following scripts in SQL to free up "locked" transactions: delete * from SY00800/SY00801/ACTIVITY (against the DYNAMICS database) an...

View & Insert missing from menu bar!?!?!
Don't know what happened but View & Insert no longer appear in my menu bar. Anyone know how I can add them back in??? All you should have to do is click on them once and they should be there next time you go into that menu. Let us know if that doesn't work... JG "trixiebme" wrote: > Don't know what happened but View & Insert no longer appear in my menu bar. > Anyone know how I can add them back in??? How can I click on something that is not there? "Jonathan G." wrote: > All you should have to do is click on them once and they should...

Link Error #2
I was able to use CL.exe to compile and link .cpp or .c file in a command line. But all in a sudden, I can not do this any more, as I always got such an error message: LINK : fatal error LNK1104: cannot open file 'C:\Documents' I didn't do complicated compiling. e.g. I even tested with the "hello word" thing. cl hello.c where hello.c is just this: #include <stdio.h> main() { printf("hello world!\n"); } But again, this LINK : fatal error LNK1104: cannot open file 'C:\Documents' happens too! It seems something wrong with the path that CL....

SQL Server Timeout Error when searching for KB-Articles
Hello Community, i got an "SQL Server Timeout expired" Error when searching for KB-Articles in either the Webclient or Outlook. Environment: Windows Server 2003 R2 SQL 2005 + SP2 CRM 3.0 inkl. Update Rollup 1 Hey Mark, just a thought, as I'm going through some things with NTEXT fields and having issues in cirtain cases. Is it possible that some of the knowlege base articles have "Copy/Pasted" text from another application into the KB article? I've noticed on a few occasions with the NTEXT fields of notes and history/activities that when people are copy...

data error while opening files
when i open excel or word existing file i getting contents as "DATAError [47 0F 94 93 F4 K5]" instead of my saved data. pls help me solving. My all word & excel files are have same problem. ...

insert password using vb
I have multi worksheets in a template with formulas. I can hide th formulas but if I add a password, my macros stop and ask for th password when the macro is in a protected worksheet. Is there a way o adding the password to a macro so that the macro will run smoothl without stopping and asking for a manual insertion of the password? Thanks Do -- abbevill ----------------------------------------------------------------------- abbeville's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=976 View this thread: http://www.excelforum.com/showthread.php?threadid=26122 ...

Custom Filter that Displays All But in Ascending or Decending Orde
I have a worksheet that is password protected. The creator of the sheet would like her users to be able to sort the data without unlocking the cells (don't want others to edit the content) which is not possible in Excel. I have tried recroding a macro to unprotect the sheet, perform a SORT and the reprotect the sheet -- but the users are still prompted to enter a password to unprotect the sheet. The creator has also added an Auto Filter to the sheet which works while protected. Is there a way to create a custom AutoFilter that will display all entries in alphabetical order? -- s...

Error 0x800CCC0F
I have been running Outlook 2002 for a couple of months with no problems. This last week I started getting a the message 0x800CCC0F when I send e-mails with with attachements. A small file, about 20k will send. But if the file is much larger (I know I fail at 40k) I get the above message. Any help would be apprciated. ...