View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Scott Scott is offline
external usenet poster
 
Posts: 4
Default checkbox code makes excel sloowwwww...

I have 20 checkboxes that I do not want users to be able to change.
They are grouped with about 130 other checkboxes that users can
change; the checked-or-unchecked status of the 20 checkboxes is
controlled elsewhere by setting the linked cell values to TRUE or
FALSE. However, I want the checkboxes to have the same appearance of a
normal checkbox.

I have tried the following code with one of the checkboxes:

Private Sub cBoxGR1_Click()

cBoxGR1.Value = Not cBoxGR1.Value

End Sub

It works, but when I check on the checkbox (whether checked or
unchecked), the box becomes grayed out, and a message in the status
bar says "Calculating Cells: 100%" - this lasts for several seconds
and the workbook is inaccessible. Then the workbook comes back to
life, and the grayed out appearance goes away. I've tried an
if..then...else variation with the same result. I don't have any
Worksheet_Calculate code, or anything else like that.

Any ideas why the worksheet is taking so long to recalculate? Other
options to accomplish the same goal?

Please reply to the group, the email I posted with is <ahem designed
to gather SPAM.

Thanks,
Scott