Adding Additional ActiveX Control From OCX File

RJPotts

Board Regular
Joined
Apr 11, 2007
Messages
143
Hi All,

I'm having some trouble adding an additional (ActiveX) control from an ocx file and was hoping someone might be able to tell me what I'm doing wrong please.......

I am working on a project for a charity (a museum), for an Excel based sales system (with some specific elements hence not an off-the-shelf system). The computer is connected to a receipt printer which in turn has a cash-drawer connected. The printer beginning to print something is normally what triggers the drawer to open. I'd like to provide though some functionality to be able to open the drawer without making a sale or printing anything (if someone needs change for the coffee machine for example).

I know this is possible as I've done it in the past. I'd actually kept some notes at the time which tell me that the process was;

1) Add a reference to StarCEComponents.ocx in the vba project
2) Add StarCEComponents.CashDrawerKicker as an additional control to the VBA toolbox
3) Add the CashDrawerKicker control where required or call CashDrawerKicker.OpenCashDrawer from elsewhere

So, when I found the notes I thought great! But...... I have;

1) Registered the ocx with regsvr32 and received a success message
2) Added a reference to the ocx

When I then go to add the additional control there is nothing additional listed, i.e. StarCEComponents.CashDrawerKicker is not there to be added as an additional control.

I've invested a huge amount of time in this project (just to be clear, not paid) and am very very happy with the results thus far, I just have this one sticking point. I'm hoping that someone might be able to tell me where I'm going wrong please? Has the methodology for adding additional controls changed? Might I have left a step out of my notes? Might a change in office version have spoilt things?

Incase it's relevant, I'm using Office 2019 and Windows 11. The receipt printer is a Star TSP-100.

Many thanks
Richard
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hi. It seems like everything you're doing is right. Is it possible that you're now using a different version of Office? That is to say that previously, when it worked, it was on a 32 bit version of office, whereas now you're using a 64bit version of office?

Also, which directory are you using regsrv32 in?
 
Upvote 0
Hi. It seems like everything you're doing is right. Is it possible that you're now using a different version of Office? That is to say that previously, when it worked, it was on a 32 bit version of office, whereas now you're using a 64bit version of office?

Also, which directory are you using regsrv32 in?
Hi Dan,

Thank-you very much for the message!

Yes, it is very likely that I am using a different version of office, I think it was +/- 5 years ago that I did this successfully, I'm afraid I don't know for sure if it will have been 32 or 64bit.

It is a 64bit version that I am using. I ran the RegSvr command from C:\Windows\system32.

Best regards
Richard
 
Upvote 0
Ahh ok
I wonder then if perhaps the OCX file is 32-bit. That would then mean that it can't be used on 64- bit office. Could you contact the company and ask if they can send you the 64- bit version?
 
Upvote 0
Ahh ok
I wonder then if perhaps the OCX file is 32-bit. That would then mean that it can't be used on 64- bit office. Could you contact the company and ask if they can send you the 64- bit version?
Hi,

Thanks again for the message!

That's what I'm wondering too and is the very thing I've asked them.

I emailed them last night with the initial issue details and there was a reply earlier today with a link to a download with an exe file which, when run with the correct parameters, opens the drawer. I've tried it with a shell command (successfully) but will see if they do have a 64bit ocx (if that is the issue), to avoid having to include an exe with the finished file.

Best regards
Richard
 
Upvote 0
And just to add..........

Just had another reply from Star (I must say their support is superb) and yes, the OCX is 32bit only.

Best regards
Richard
 
Upvote 0
Ahh that's great. Thanks for updating us
The whole 32 v 64 bit office thing has caused no end of issues when it comes to controls. There is a new programming language called TwinBasic that is designed to be 100% backwards compatible with VBA and VB6 and will enable us to make our own OCX files for VBA in both 32 bit and 64bit. It will be a game changer for us once it's completed.
 
Upvote 0

Forum statistics

Threads
1,223,929
Messages
6,175,460
Members
452,644
Latest member
gjcase

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