VBA Worksheet Protection whilst mainting ActiveX Functionality

mizogy

New Member
Joined
Jul 5, 2011
Messages
40
Office Version
  1. 365
Platform
  1. Windows
Hi ALl

Hoping someone will be able to help me out there, I've been racking my brains and cannot find a solution.

Please see code below. The intention is to apply protection to the sheet whilst allowing ActiveX functionality (i.e. use of slider bars) whilst the worksheet is protected. It had been working until recent, however now getting a Run-time error '51721' Application-defined or object-defined error

Private Sub Workbook_Open()
Application.EnableEvents = True
Application.Calculation = xlSemiautomatic
Application.ScreenUpdating = False
With Worksheets("RPOA Calculator")
.Protect Password:="commercialrpoa", UserInterfaceOnly:=True
.EnableOutlining = True
End With
End Sub

Your help appreciated!

Mizogy
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Last edited:
Upvote 0
Good shout, however my setting is already applied to 'Enable all controls without restrictions' so not the issue....


maybe this will fix it... never saw this error but googled this for you...

https://www.altera.com/support/support-resources/knowledge-base/solutions/rd08172012_653.html


  1. Select Excel Options
  2. Select the Trust Center category and click Trust Center Settings
  3. Select the ActiveX Settings category
  4. Change the setting from Disable all controls without notification to one of the other options.
 
Upvote 0
Ah I see... I kinda didn't like that solution anyway. I hate when people tell me to solve a problem by disabling a notification. LOL

Good luck though.
 
Upvote 0
OK, this is strange, getting the same message if just trying to select the sheet. Tried changing the name of the sheet as well but still same issue. Help!?!

Sheets("RPOA Calculator").select
 
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,051
Members
452,542
Latest member
Bricklin

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