Unchecking all Forms checkboxes in entire sheet
I found this great code for unchecking all Form Toolbar created
checkboxes on a single sheet: Sub Clearem() Dim bx as object For each bx in Worksheets("Sheet1").Checkboxes bx.value = xlOff Next End Sub How can I adapt this to uncheck all boxes in an entire workbook? I've tried Activebook and workbook("") with no luck. Thanks in adavnce. |
Unchecking all Forms checkboxes in entire sheet
Use this code:
Dim objWorksheet As Worksheet For Each objWorksheet In ActiveWorkbook.Worksheets 'Your For loop goes here Next objWorksheet michaelberrier wrote: I found this great code for unchecking all Form Toolbar created checkboxes on a single sheet: Sub Clearem() Dim bx as object For each bx in Worksheets("Sheet1").Checkboxes bx.value = xlOff Next End Sub How can I adapt this to uncheck all boxes in an entire workbook? I've tried Activebook and workbook("") with no luck. Thanks in adavnce. |
Unchecking all Forms checkboxes in entire sheet
That rocks! Thanks, mb |
Unchecking all Forms checkboxes in entire sheet
No need to loop Forms type checkboxes
Worksheets("Sheet1").CheckBoxes.Value = xlOff ' or xlOn checked xlOff is -4146 but 0 also works, xlOn is +1 Regards, Peter T "michaelberrier" wrote in message ups.com... I found this great code for unchecking all Form Toolbar created checkboxes on a single sheet: Sub Clearem() Dim bx as object For each bx in Worksheets("Sheet1").Checkboxes bx.value = xlOff Next End Sub How can I adapt this to uncheck all boxes in an entire workbook? I've tried Activebook and workbook("") with no luck. Thanks in adavnce. |
All times are GMT +1. The time now is 11:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com