using protection (but allowing a combobox to still work)

N

neowok

I have some workbooks i need to protect from anyone making changes (an
thus ending up with invalid versions).

The problem is I have a combobox on them and when protected, even if
click to allow every single thing in the checkboxes, i still get a
error saying this cannot be done on a protected workbook when i clic
something in the combobox. the error highlights this line of code

Me.Range("mytables").AutoFilter 4, _
"=*" & Me.ComboBox1.Value & "*", xlAnd, , False

is it possible to get this to run? I ticked every box (including th
allow autofilter) but still this error comes up
 
M

Mark Rosenkrantz

Neo;

Can it be that your combobox is working with a range of cells which are
protected ?

Mark.
 
N

neowok

those cells are on the same sheet as the combobox, and the all the
tickboxes for allowing stuff in protection have been ticked for that
sheet. th other 2 sheets arent protected at all at the moment.
 
N

neowok

hmmm what code would unprotect the sheet (including entering
password)?

worksheet.unprotect(password)
 
T

Tom Ogilvy

worksheets("Sheet1").Unprotect Password:="ABCD"
' code
Worksheets("Sheet1").Protect Password:="ABCD"
 
Top