protect sheet with textbox filter

paroduso

Board Regular
Joined
Sep 11, 2013
Messages
103
Office Version
  1. 2019
Platform
  1. Windows
Hi everyone...im facing this problem...i use a textbox with VBA code to filter my database...as i type in the textbox the data is filtered
automatically...and i want to protect the sheet...but when i protect and try to type in the textbox error apears...the cell or graph you are triyng to change is in a
protected sheet...to make changes unlock the sheet...

Is there any way around this situation...since I don't want the data to be messed with.

thank you very much.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi @paroduso
I have an idea, but I'm not sure if it will work on a Text Box only. Maybe you'll need to add a button that the user has to press in order to search.

You could add an unlock / lock routine to your code.
So when the user presses the button, the code would unlock the sheet and lock it again after the search is finished.
The downside of this is that you expose the password inside the VBA code.

A possible workaround would be to protect the VBA code from viewing or use a password encryption / decryption.

Besides, I found something interesting on automateexcel: VBA Protect / Unprotect Worksheets - Automate Excel
 
Upvote 0

Forum statistics

Threads
1,213,492
Messages
6,113,967
Members
448,537
Latest member
Et_Cetera

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top