ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protection error when running VB code (https://www.excelbanter.com/excel-programming/352832-protection-error-when-running-vbulletin-code.html)

mrossman04

Protection error when running VB code
 

I have a protected workbook with several protected sheets. I have
written VB code tied to various buttons and drop down which mainly hide
and show various rows in the sheets. Everytime a function or sub is run
they unprotect the workbook and sheets, run the code, then protect
everything once completed, however when I click on the checkboxes and
drop downs that I am using I get an error stating the the cell or sheet
is protected and they need t obe unprotected first, however if I click
OK all my code runs and everything is fine.

Is there a way to not have the protection error dialog pop-up everytime
I click a control?

The error pops up before it even gets into the VB code, so I am sure
there is nothing wrong with the code. It just annoying to click on the
dialog everytime.


--
mrossman04
------------------------------------------------------------------------
mrossman04's Profile: http://www.excelforum.com/member.php...o&userid=31345
View this thread: http://www.excelforum.com/showthread...hreadid=510342


Dave Peterson

Protection error when running VB code
 
It kind of sounds like you're locking the cells that those controls are linked
to. Is that possible?

mrossman04 wrote:

I have a protected workbook with several protected sheets. I have
written VB code tied to various buttons and drop down which mainly hide
and show various rows in the sheets. Everytime a function or sub is run
they unprotect the workbook and sheets, run the code, then protect
everything once completed, however when I click on the checkboxes and
drop downs that I am using I get an error stating the the cell or sheet
is protected and they need t obe unprotected first, however if I click
OK all my code runs and everything is fine.

Is there a way to not have the protection error dialog pop-up everytime
I click a control?

The error pops up before it even gets into the VB code, so I am sure
there is nothing wrong with the code. It just annoying to click on the
dialog everytime.

--
mrossman04
------------------------------------------------------------------------
mrossman04's Profile: http://www.excelforum.com/member.php...o&userid=31345
View this thread: http://www.excelforum.com/showthread...hreadid=510342


--

Dave Peterson

mrossman04[_2_]

Protection error when running VB code
 

That was it, Thank you


--
mrossman04
------------------------------------------------------------------------
mrossman04's Profile: http://www.excelforum.com/member.php...o&userid=31345
View this thread: http://www.excelforum.com/showthread...hreadid=510342



All times are GMT +1. The time now is 05:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com