Best Way to protect sheet & workbook with VB

C

CDotWin

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.
 
Top