Results 1 to 7 of 7
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Excel VBA (Excel2000)

    UserForms have no built-in support for charts. I don't think it will be easy.

    You might add a Microsoft Chart Control if that is installed on your PC (I think it comes with VB6). Right click the Toolbox, select Additional Controls..., tick Microsoft Chart Control, version 6.0 (OLEDB), then click OK. A new icon will appear on the Toolbox. Use it to add a chart control to your userform. You would have to populate the chart entirely in code, see Using the MSChart Control. Since the average user probably will not have the chart control (MSChrt20.ocx) installed, you would have to create an installation package for your workbook.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel VBA (Excel2000)

    You need to create the chart in a (hidden) sheet, then saveas that
    chart as a picture, then have a picture control on your form you update
    with that file. See this page for a how-to:

    http://www.j-walk.com/ss/excel/tips/tip66.htm
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Chart on userform (Excel 2000 VBA)

    (Subject edited by HansV to make it more useful for searching.)

    Hi,

    I have drawn up a user form in excel vba that contains drop down combos and text boxes for users to make choices etc. I also would like to represent a chart on the user form that is drawn up as a embedded chart in the excel workbook. My question is: How do I represent the chart from the spreadsheet on the user form in vba. I cant use the image control as there is no link property. What otyher control is there, or how do i overcome this??!!

    Please help anyone!
    Regards,
    Rudi

  4. #4
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Excel VBA (Excel2000)

    Thanx Hans
    I'll look into that site you mailed me, I'm sure it will help.
    Thanx again for your speedy assistance
    Rudi
    Regards,
    Rudi

  5. #5
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Excel VBA (Excel2000)

    Many thanx Pieterse,
    Your fast response is encouraging, to know there is always someone out there to help.
    I'll look into your suggestions and see if it can do the job.
    Thanx again,
    Rudi
    Regards,
    Rudi

  6. #6
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel VBA (Excel2000)

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

    Hey RudiS

    Be careful on this.

    When you paste from the hidden sheet to the control you may need to break the links - this can have some unintended side effects where the source formulas are altered. (http://support.microsoft.com/default.aspx?...kb;EN-US;214139)

    I've used the mentioned tips and most of the times it works OK, but from time to time I get some really odd results.
    Then, when investigating further some of the links are suddenly changed.

    I've tried to debug it about a zillion times, without luck so far. It seems rather random, but falls within the categories mention in the MSDN article.

    Good luck,
    /H
    Bests,
    RD


    PS: Wish there were a knob on the TV to turn up the intelligence. There's a knob called "brightness," but that doesn't work

  7. #7
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Excel VBA (Excel2000)

    Hi Henrik,

    Thanx for the reply post. I am querying this for a friend of mine, so I'll make sure to pass on your suggestions and warnings.

    Cheers Rudi
    Regards,
    Rudi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •