Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Using CWGraph from an Excel VBA macro

Using CWGraph from an Excel VBA macro

Can I use CWGraph from an Excel VBA macro and run the macro on a PC that does not have Measurement Studio installed (just distribute CWUI.ocx) without getting the evaluation control message?
This works perfectly if I have the Measurement Studio installed but is not practical to have to buy a license for every PC that is running the macro.

Thanks, MSEMS
0 Kudos
Message 1 of 4
(6,798 Views)
I do not know much about Excel, so this may not be the easiest way, but I suggest creating a new ActiveX DLL project in VB6 that contains a user control that uses the graph. Once that's built, you should be able to use the user control from an Excel macro since your ActiveX DLL will have the embedded license for CWGraph. This should work on other PCs if you distribute the ActiveX DLL and CWUI.ocx.

- Elton
0 Kudos
Message 2 of 4
(6,798 Views)
Hi Elton and thanks for your help.

This sounds straight forward but I never did something like that. Can you point me to some article, sample or anything that will help me?

I really need to expose CWGraph with all its design and run time methods and properties.
Ideally if I can create a user control, insert CWGraph on it and create a property to expose CWGraph and the graph control is resized with the user control that will make it.
0 Kudos
Message 3 of 4
(6,782 Views)
Hi MSEMS,

Like Elton suggested, you can create a ActiveX DLL for the MStudio ActiveX control and call them in the Excel.

To start, you can refer to the following links:
Using the Measurement Studio ActiveX Controls in Microsoft Excel
Using ActiveX Controls on a Microsoft Excel Worksheet

You can always expose the hidden properties of the ActiveX control by creating properties in the ActiveX DLL project. Thus kind of wrapping the hidden properties with you custom properties.

I hope this helps,
Rajiv G
0 Kudos
Message 4 of 4
(6,755 Views)