Protect - Unprotect from ActiveX Control

  • Thread starter Thread starter Nigel
  • Start date Start date
N

Nigel

Hi All
I have piece of code that simply unprotects a worksheet, manipulates the
sheet contents and re-protects the same sheet. This works fine if run from
a workbook module. I then add a ActiveX control button to the sheet, and
assign the code to this button through the click-event. I have tried
putting the code directly into the event and calling the code from the
module but both fail.

I rarely use controls on sheets but do recall seeing some references to
specfic issues that may be the cause of my difficulties. Can anyone shed
any light on this? TIA

Cheers
Nigel
 
Set the TakeFocusOnClick property of the button to FALSE if using XL97.
Or possibly ActiveCell.Select just before the code that is causing the
error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top