Active x controls go transparent... but still work!

Oliver Dewar

Board Regular
Joined
Apr 17, 2011
Messages
201
Hi All.

I have an excel app that uses several active x controls. The system can work for days without issue... even weeks. Then suddenly, a macro that's been run thousands of times runs... and the active x controls become rectangles with a red x in the corner.

Its like they simply didn't render correctly, because you can still click on them and they work just fine!

I saw another thread that's similar, but unresolved:

http://www.mrexcel.com/forum/showthread.php?t=523644

I'm not worried about stopping this happening (unless someone already knows the solution) because it seems to be an excel bug... I'd like to know if anyone's found a way to 'refresh' the active x rendering, so I can include a form button to refresh, and therefore continue on without having to close and reopen the workbook as we do now.

Cheeeeeers all!

Excel 2007 - Windows 7.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
i have had this happen with non MS activex controls. i found that it was more likely to occur if i copied and pasted the control, rather than draw a new one from the toolbox. also had them not display at all but still function when operated as if they where visible (?) try drawing a new control from the toolbox.
 
Upvote 0
its an odd problem, but as i said it was only with nonMS ocx's specifically CodeJock Suite v13.0 every now and then it turns up and i find that by deleting and drawing a fresh one that it generally works fine afterwards. could be worth check your draw buffer if you have a lot of controls on the form
 
Upvote 0
when you add a new userform, there is a property called .DrawBuffer. the default value is 32000 (bytes), but it can be changed. it is the amount of memory excel allocates to render the form. if it is very complex, then increasing memory can help out.
 
Upvote 0
Here's my solution.

Remove all active x controls as they are ultimately unstable.

Replace them with buttons created by shapes with 3d bevels, and change the bevel type at the start of the macro, before restoring at the end - to get the button press effect.

Use shape textboxes edited by VBA instead of active x labels.

Works like a charm... and no more dissapearing controls!
 
Upvote 0

Forum statistics

Threads
1,216,494
Messages
6,130,977
Members
449,611
Latest member
Bushra

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