View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] jamasm2010@gmail.com is offline
external usenet poster
 
Posts: 33
Default Checkbox Quandry

I have a spreadsheet with a number of non-contiguous checkboxes (forms control) in column A. Section headings break up the sequence. In column B, there is a description associated with each checkbox. I need to be able to check the status of the checkboxes - if checked, copy the description to a new sheet. If no checkbox is found, then print the section heading and continue.. The snippet below is as far as I can get before I run into problems. Any help would be greatly appreciated.

LastRow = curWks.Cells(curWks.Rows.Count, 2).End(xlUp).Row
For iRow = 3 To LastRow
For Each myCBX In curWks.CheckBoxes
If myCBX.Value = xlOn Then
curWks.Cells(iRow, 2).Copy Destination:=Worksheets("Sheet1").Cells(xCntr + 1, 1)
xCntr = xCntr + 1
End If
Next myCBX
Next iRow