Page 1 of 1
Graph in UserForm
Posted: November 27th, 2002, 12:34 pm
by Domingues
Please, how could I display a graph in a UserForm?
Graph in UserForm
Posted: November 27th, 2002, 12:38 pm
by Domingues
Ops... I'm talking about VBA... sorry.
Graph in UserForm
Posted: November 27th, 2002, 8:50 pm
by PinballWizard
Domingues,I assume you are trying to place an Excel chart onto a VBA UserForm (?).Unfortunately it cannot be done directly. The easiest way would be to convert the Excel chart to a bitmap and then to assign the bitmap to the .Picture property of the form itself (i.e. as a background bitmap) or the .Picture property of an Image control.Of course an alternative is to plot your chart programmatically. You would have to do this by making calls to the Win32 (GDI) API, as none of the built-in VBA controls have the VB drawing methods (Pset() etc. )Using a 3rd party charting control (e.g. ChartFX, Dundas Chart) is another option if you have access to one.Let me know if you need more help.P.
Graph in UserForm
Posted: November 28th, 2002, 1:13 am
by PinballWizard
..I missed a couple of options:- you can use an Excel spreadsheet ActiveX control (comes with VB6 I believe) or an Office Web component control. These alternatives are not great though as these controls are quite big and clunky.BTW Domingues, nice website you have, and cool calculator you built I have seen a similar calculator built using Flash - it looks just like the real thing.
Graph in UserForm
Posted: November 28th, 2002, 11:50 am
by Domingues
Thank you!!! I'll use the easiest way. I think my website needs a English version.