Hiding an ActiveX button when hiding columns

crobaseball

Board Regular
Joined
Mar 14, 2014
Messages
59
I am putting several buttons into my spread sheet and would prefer to use ActiveX controls rather than form controls. But I also need to hide the buttons from the end user (controls are to update data and will be used by the person who maintains the workbook). When I go to hide the columns, the ActiveX button doesn't hide with it. On the other hand, if I use a Form Control Button instead, it does indeed disappear when I hide the columns. Is there any way to get the ActiveX button to hide when hiding the columns?

Thanks!
 
It is not a module. It goes in the Worksheet Change Event. Click on the worksheet tab, then View Code.
At the top left will be a dropdown tab that says General. Click the tab and select Worksheet under General.
On the right side is a tab that has several options one of which will be Selection Change. Click on Selection Change
That will insert the first line and the last line of the code I included above. Insert the rest of the code in between. It will execute every time there is a selection change on the worksheet.
Let me know if you have problems. You are welcome.
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,215,376
Messages
6,124,593
Members
449,174
Latest member
chandan4057

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