ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   using protection (but allowing a combobox to still work) (https://www.excelbanter.com/excel-programming/293396-using-protection-but-allowing-combobox-still-work.html)

neowok[_39_]

using protection (but allowing a combobox to still work)
 
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

--
Message posted from http://www.ExcelForum.com


Mark Rosenkrantz[_2_]

using protection (but allowing a combobox to still work)
 
Neo;

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

Mark.
--
More Excel ? www.rosenkrantz.nl or
-------------------------------------------------------------------

"neowok " wrote in message
...
I have some workbooks i need to protect from anyone making changes (and
thus ending up with invalid versions).

The problem is I have a combobox on them and when protected, even if i
click to allow every single thing in the checkboxes, i still get an
error saying this cannot be done on a protected workbook when i click
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 the
allow autofilter) but still this error comes up.


---
Message posted from
http://www.ExcelForum.com/




neowok[_40_]

using protection (but allowing a combobox to still work)
 
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.


---
Message posted from http://www.ExcelForum.com/


Tom Ogilvy

using protection (but allowing a combobox to still work)
 
In your code: Unprotect the sheet, perform your action, protect the sheet.

--
Regards,
Tom Ogilvy

"neowok " wrote in message
...
I have some workbooks i need to protect from anyone making changes (and
thus ending up with invalid versions).

The problem is I have a combobox on them and when protected, even if i
click to allow every single thing in the checkboxes, i still get an
error saying this cannot be done on a protected workbook when i click
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 the
allow autofilter) but still this error comes up.


---
Message posted from http://www.ExcelForum.com/




neowok[_41_]

using protection (but allowing a combobox to still work)
 
hmmm what code would unprotect the sheet (including entering
password)?

worksheet.unprotect(password)

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

using protection (but allowing a combobox to still work)
 
worksheets("Sheet1").Unprotect Password:="ABCD"
' code
Worksheets("Sheet1").Protect Password:="ABCD"

--
Regards,
Tom Ogilvy

"neowok " wrote in message
...
hmmm what code would unprotect the sheet (including entering a
password)?

worksheet.unprotect(password) ?


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 02:27 PM.

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