If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
ActiveX control with chart
I have an ActiveX control producing some special charts
which cannot be done in Excel itself. I would like to embed this control into Excel sheets, and they should behave similar to Excel charts (e.g. resize when the lower right corner is grabbed and moved). The chart object in Excel does have an OLEObjects function method, so it seems to be able to report embedded OLEObjects, but it does not have an Add method for such objects. Can I embed my ActiveX object in a chart, or at least resizably in a worksheet? OLEObject's don't have a resize event, so "plain" embedding does not seem to work. Somebody on another group mentioned that it possibly can be done with Forms from the Forms toolbar. Is this a viable solution. Are there example anywhere? |
#2
|
|||
|
|||
Hi Erich -
Last year I installed a third party ActiveX chart control, thinking I'd use it for some funky new charts. Five minutes ago I used it for the first time, to get a handle on your question. I insert the chart using Insert menu Object, and selecting it from the list. I could activate the control's dialog with the right button, but otherwise I couldn't select or activate the control. The best I could do in vba was to change its position (activesheet.shapes(1).top and .left) and its size (.width and .height) but not its aspect ratio. Then I switched to design mode (click the quaint T-square and triangle button on Excel's Visual Basic command bar). This enabled me to select the objects, move and size it with the mouse, and change the aspect ratio. Interestingly, as soon as I ran something from the VB Editor, Excel exited design mode, and VB was unable to do very much. Excel created a reference to the control, but for the life of me, I could see nothing that talked of a container for the control. I suspect the container is just a nondescript Shape. I even turned on the macro recorder while I played for a while. The kind of code it generated looked like this: ActiveSheet.Shapes("Chart2D2").Select Selection.ShapeRange.IncrementLeft 40.5 Selection.ShapeRange.ScaleHeight _ 0.75, msoFalse, msoScaleFromBottomRight Selection.Verb Verb:=xlOpen Selection.Verb Verb:=xlPrimary Seems like all Excel can see is the Shape that encloses the control. I hope this rambling gives you some insight. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Erich Neuwirth wrote: I have an ActiveX control producing some special charts which cannot be done in Excel itself. I would like to embed this control into Excel sheets, and they should behave similar to Excel charts (e.g. resize when the lower right corner is grabbed and moved). The chart object in Excel does have an OLEObjects function method, so it seems to be able to report embedded OLEObjects, but it does not have an Add method for such objects. Can I embed my ActiveX object in a chart, or at least resizably in a worksheet? OLEObject's don't have a resize event, so "plain" embedding does not seem to work. Somebody on another group mentioned that it possibly can be done with Forms from the Forms toolbar. Is this a viable solution. Are there example anywhere? |
#3
|
|||
|
|||
Hi Jon,
your message essentially confirms most of the things I have tried. It is next to impossible to embed custom chart controls in a way they behave similar to Excel charts. The strange thing I found is that chart objects have a (function) method OLEObjects, so this creates the impression that one can ask a chart object about embedded objects, but I have not found a way which would allow to set an embedded object. This is really a pity because extending the range of available graphics would be quite nice. Jon Peltier wrote: Hi Erich - Last year I installed a third party ActiveX chart control, thinking I'd use it for some funky new charts. Five minutes ago I used it for the first time, to get a handle on your question. I insert the chart using Insert menu Object, and selecting it from the list. I could activate the control's dialog with the right button, but otherwise I couldn't select or activate the control. The best I could do in vba was to change its position (activesheet.shapes(1).top and .left) and its size (.width and .height) but not its aspect ratio. Then I switched to design mode (click the quaint T-square and triangle button on Excel's Visual Basic command bar). This enabled me to select the objects, move and size it with the mouse, and change the aspect ratio. Interestingly, as soon as I ran something from the VB Editor, Excel exited design mode, and VB was unable to do very much. Excel created a reference to the control, but for the life of me, I could see nothing that talked of a container for the control. I suspect the container is just a nondescript Shape. I even turned on the macro recorder while I played for a while. The kind of code it generated looked like this: ActiveSheet.Shapes("Chart2D2").Select Selection.ShapeRange.IncrementLeft 40.5 Selection.ShapeRange.ScaleHeight _ 0.75, msoFalse, msoScaleFromBottomRight Selection.Verb Verb:=xlOpen Selection.Verb Verb:=xlPrimary Seems like all Excel can see is the Shape that encloses the control. I hope this rambling gives you some insight. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Erich Neuwirth wrote: I have an ActiveX control producing some special charts which cannot be done in Excel itself. I would like to embed this control into Excel sheets, and they should behave similar to Excel charts (e.g. resize when the lower right corner is grabbed and moved). The chart object in Excel does have an OLEObjects function method, so it seems to be able to report embedded OLEObjects, but it does not have an Add method for such objects. Can I embed my ActiveX object in a chart, or at least resizably in a worksheet? OLEObject's don't have a resize event, so "plain" embedding does not seem to work. Somebody on another group mentioned that it possibly can be done with Forms from the Forms toolbar. Is this a viable solution. Are there example anywhere? |
#4
|
|||
|
|||
Erich -
I just checked the object browser about Chart.OLEObjects, which I'd never happened across before. Interesting. There's no example of OLEObjects with a chart, only with a worksheet. This example indicates that it deals with OLE objects embedded in the sheet. And that's cool, you can embed an OLE object into a worksheet. But you can't embed one into a chart sheet or embedded chart; copy and paste one and you get a picture object. I can't determine what the OLEObjects really means, unless it's just there to keep the Sheet object from crashing (or can we hope about a future enhancement??). So either I'm misinterpreting what the chart's OLEObjects means, or it means nothing. A MS Graph chart (the kind that you get in PowerPoint or Word) exists in an OLE object, and you can program it through the OLE object. The reason you can't program (or even manually adjust) the ActiveX chart object within Excel is that it wasn't programmed to allow you to do so. Some ActiveX graphical tools are designed to let you manipulate them in Excel. I tried out a Heat Map ActiveX thing last year which integrated nicely with Excel, and I got a sample CD for another ActiveX chart which supposedly works with Excel (all I read was the readme file). If you find anything useful, though. please let us know. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Erich Neuwirth wrote: Hi Jon, your message essentially confirms most of the things I have tried. It is next to impossible to embed custom chart controls in a way they behave similar to Excel charts. The strange thing I found is that chart objects have a (function) method OLEObjects, so this creates the impression that one can ask a chart object about embedded objects, but I have not found a way which would allow to set an embedded object. This is really a pity because extending the range of available graphics would be quite nice. Jon Peltier wrote: Hi Erich - Last year I installed a third party ActiveX chart control, thinking I'd use it for some funky new charts. Five minutes ago I used it for the first time, to get a handle on your question. I insert the chart using Insert menu Object, and selecting it from the list. I could activate the control's dialog with the right button, but otherwise I couldn't select or activate the control. The best I could do in vba was to change its position (activesheet.shapes(1).top and .left) and its size (.width and .height) but not its aspect ratio. Then I switched to design mode (click the quaint T-square and triangle button on Excel's Visual Basic command bar). This enabled me to select the objects, move and size it with the mouse, and change the aspect ratio. Interestingly, as soon as I ran something from the VB Editor, Excel exited design mode, and VB was unable to do very much. Excel created a reference to the control, but for the life of me, I could see nothing that talked of a container for the control. I suspect the container is just a nondescript Shape. I even turned on the macro recorder while I played for a while. The kind of code it generated looked like this: ActiveSheet.Shapes("Chart2D2").Select Selection.ShapeRange.IncrementLeft 40.5 Selection.ShapeRange.ScaleHeight _ 0.75, msoFalse, msoScaleFromBottomRight Selection.Verb Verb:=xlOpen Selection.Verb Verb:=xlPrimary Seems like all Excel can see is the Shape that encloses the control. I hope this rambling gives you some insight. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Erich Neuwirth wrote: I have an ActiveX control producing some special charts which cannot be done in Excel itself. I would like to embed this control into Excel sheets, and they should behave similar to Excel charts (e.g. resize when the lower right corner is grabbed and moved). The chart object in Excel does have an OLEObjects function method, so it seems to be able to report embedded OLEObjects, but it does not have an Add method for such objects. Can I embed my ActiveX object in a chart, or at least resizably in a worksheet? OLEObject's don't have a resize event, so "plain" embedding does not seem to work. Somebody on another group mentioned that it possibly can be done with Forms from the Forms toolbar. Is this a viable solution. Are there example anywhere? |
#5
|
|||
|
|||
ActiveX control with chart
Hi Jon Did you ever resolve this issue you discussed with Erich Neuwirth? I have an almost identical problem: I've OLEembedded various activex picture controls on worksheets, only to find I can't load images into them, see images in them, or see their properties and methods. I can activate an object using MyObject.Active, but this seems to change nothing. I can select an OLEObject with MyObject.Select, but then using With Selection, the tipswindow only shows the sheet properties, not the OLEobject properties. As you say, it seems like all Excel can see is the Shape that encloses the control. I'd be extremely grateful for any help from anyone. Jon Peltier wrote: [b]Hi Erich - Last year I installed a third party ActiveX chart control, thinking I'd use it for some funky new charts. Five minutes ago I used it for the first time, to get a handle on your question. I insert the chart using Insert menu Object, and selecting it from the list. I could activate the control's dialog with the right button, but otherwise I couldn't select or activate the control. The best I could do in vba was to change its position (activesheet.shapes(1).top and .left) and its size (.width and .height) but not its aspect ratio. Then I switched to design mode (click the quaint T-square and triangle button on Excel's Visual Basic command bar). This enabled me to select the objects, move and size it with the mouse, and change the aspect ratio. Interestingly, as soon as I ran something from the VB Editor, Excel exited design mode, and VB was unable to do very much. Excel created a reference to the control, but for the life of me, I could see nothing that talked of a container for the control. I suspect the container is just a nondescript Shape. Seems like all Excel can see is the Shape that encloses the control. - Jon -- Tanihera ------------------------------------------------------------------------ Posted via http://www.mcse.ms ------------------------------------------------------------------------ View this thread: http://www.mcse.ms/message953530.html |
#6
|
|||
|
|||
ActiveX control with chart
A blast from the past. I suspect I gave up on the ActiveX charting control,
since I don't remember anything further. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ "Tanihera" wrote in message ... Hi Jon Did you ever resolve this issue you discussed with Erich Neuwirth? I have an almost identical problem: I've OLEembedded various activex picture controls on worksheets, only to find I can't load images into them, see images in them, or see their properties and methods. I can activate an object using MyObject.Active, but this seems to change nothing. I can select an OLEObject with MyObject.Select, but then using With Selection, the tipswindow only shows the sheet properties, not the OLEobject properties. As you say, it seems like all Excel can see is the Shape that encloses the control. I'd be extremely grateful for any help from anyone. Jon Peltier wrote: [b]Hi Erich - Last year I installed a third party ActiveX chart control, thinking I'd use it for some funky new charts. Five minutes ago I used it for the first time, to get a handle on your question. I insert the chart using Insert menu Object, and selecting it from the list. I could activate the control's dialog with the right button, but otherwise I couldn't select or activate the control. The best I could do in vba was to change its position (activesheet.shapes(1).top and .left) and its size (.width and .height) but not its aspect ratio. Then I switched to design mode (click the quaint T-square and triangle button on Excel's Visual Basic command bar). This enabled me to select the objects, move and size it with the mouse, and change the aspect ratio. Interestingly, as soon as I ran something from the VB Editor, Excel exited design mode, and VB was unable to do very much. Excel created a reference to the control, but for the life of me, I could see nothing that talked of a container for the control. I suspect the container is just a nondescript Shape. Seems like all Excel can see is the Shape that encloses the control. - Jon -- Tanihera ------------------------------------------------------------------------ Posted via http://www.mcse.ms ------------------------------------------------------------------------ View this thread: http://www.mcse.ms/message953530.html |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Access Calendar | lost | General Discussion | 2 | July 7th, 2004 04:58 AM |
Chart menu visible property | Sandy V | Charts and Charting | 8 | May 17th, 2004 01:39 PM |
Styles for chart | Debra Dalgleish | Charts and Charting | 1 | October 3rd, 2003 12:27 PM |