Well you wouldn't need 40 subs.

It could also work dynamically.

eg the OP says 30-40 checkboxes, perhaps that means the number might change.

Also you wouldn't need to hardcode the names of the checkboxes.

Mind you all of these 'advantages' and how to implement the idea would depend on what the OP is actually trying to do and where these checkboxes are located.

Since all it seems they want to do is change some formatting I would actually suggest they take another approach. eg conditional formatting.