ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check boxes (https://www.excelbanter.com/excel-programming/319042-check-boxes.html)

cjohnson300

Check boxes
 
Does anyone know how to determine (and change) the value of a check box via
a macro (checked or unchecked) on a protected worksheet. I can make it work
on a unprotected worksheet but would rather not have to unprotect it every
time

Thanks in advance

Tom Ogilvy

Check boxes
 
I assume the checkbox is linked to a cell in the worksheet. Can you make
that cell unlocked?

--
Regards,
Tom Ogilvy

"cjohnson300" wrote in message
...
Does anyone know how to determine (and change) the value of a check box

via
a macro (checked or unchecked) on a protected worksheet. I can make it

work
on a unprotected worksheet but would rather not have to unprotect it every
time

Thanks in advance




Ron de Bruin

Check boxes
 
Hi

If you protect your worksheets with userinterfaceonly your code will work
Copy this event in the thisworkbook module and it will run when you open your workbook.

Try it on a test workbook first

Private Sub Workbook_Open()
Dim sh As Worksheet
Application.ScreenUpdating = False
For Each sh In ThisWorkbook.Worksheets
sh.Protect "ABCD", , , userinterfaceonly:=True
Next sh
Application.ScreenUpdating = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"cjohnson300" wrote in message ...
Does anyone know how to determine (and change) the value of a check box via
a macro (checked or unchecked) on a protected worksheet. I can make it work
on a unprotected worksheet but would rather not have to unprotect it every
time

Thanks in advance





All times are GMT +1. The time now is 01:57 AM.

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