View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robbyn Robbyn is offline
external usenet poster
 
Posts: 33
Default Looping through controls on form

Good Morning,

I have 6 checkboxes grouped (grpMaterials) within a frame on a form. If the
value of a checkbox is true, the following happens within a certain range of
cells on my worksheet:

If chkTextbook.Value = True Then
.Offset(0, 26).Value = Chr(82)
End If

The value of the second checkbox would appear in rng.Offset(0, 27), the
third in rng.offset(0, 28), etc. If the value of the checkbox is false, the
corresponding cell would be blank.

How would I loop through the controls instead of having to write the above
code for each of the checkboxes?

Thank you much,

Robbyn