Best Way to protect sheet & workbook with VB

G

Guest

Help Please

I have certain cells locked and unlocked, and the locked cells cannot be selected when the sheet is protected. What is the best way to protect the sheet, but allow VB to run its code and place values into those cells that are locked? I tried .Unprotect and .Protect before and after each event, but it didnt prove to be very efficient and produced alot of errors.

Thanks in advance,
— CDotWin
 
T

Tom Ogilvy

Look at the userinterfaceonly argument to the protect method.

--
Regards,
Tom Ogilvy

CDotWin said:
Help Please

I have certain cells locked and unlocked, and the locked cells cannot be
selected when the sheet is protected. What is the best way to protect the
sheet, but allow VB to run its code and place values into those cells that
are locked? I tried .Unprotect and .Protect before and after each event,
but it didnt prove to be very efficient and produced alot of errors.
 

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

Top