Forms, Custom ActiveX & Properties

mdmilner

Well-known Member
Joined
Apr 30, 2003
Messages
1,362
I'm going to smack myself on the head once I get this right because I'm certain it'll be 'obvious'...but, in the meantime.

I've been approached for help to use some gauge activeX controls from this site (http://www.cstsoft.com/) - specifically these:
(http://www.cstsoft.com/english/product/airgauge.exe)

I used this (basically) to try to itereate thru the list of all properties and all I seemed to get are the access/form specific ones. Not the ones from this custom control.

Code:
Dim objProp As Object

  For Each objProp In Forms!dial01.ActiveXCtl22.Properties

  Next

As a summary, my intention is really to create a form with a number of these on it, and then programatically alter each on a weekly basis. Management wants cute graphs instead of numbers.

One thing I'm struggling with is how to build the reference to the control so that I don't have to explicitly name each individually. I'd love to use variables inside of: Forms!dial01.ActiveXCtl22.Properties

I'd have thought that EVAL is the proper function to do this but I think I'm just not getting something.

Is there a way to generate a list of the property names in the class? Without doing anything with paper & pencil?

ps - if it makes anybody feel any better, our intention is to 'buy'/'license' the control. I'm just looking for the right way to do this before they do so.
Never worked needed to do this particular task before so I'm in learning mode atm.

Mike
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Ack - I think I rode the "short bus" in to work today.
All of the above problems can be summarized as:

How do I assign a reference to a control on a form to an object variable using a value in a string variable?

Or

What do you know that is a better way to do this (that works)?

Mike
 
Upvote 0

Forum statistics

Threads
1,221,700
Messages
6,161,371
Members
451,700
Latest member
Eccymarge

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top