Hi,

I have the created the following procedure in Excel 2010, which should loop through each of the checkboxes on a given sheet and will expand of collapse depending on each checkbox's value

I am attempting to run the same procedure in Excel 2007, but I am receiving the above error.
I have checked that I have the same references added to the workbook and all appears to be ok.

Has anyone come across this issue before, or can you advise where I may be going wrong?

Thanks
Mitch

Code:
Sub expand_collapse_treatments()
Dim cell As Range
Dim shp As CheckBox
Application.ScreenUpdating = False




For Each shp In front.CheckBoxes
        If shp.Value = 1 Then
            Call show_hide_rows(shp.Caption, 1)
        Else
            Call show_hide_rows(shp.Caption, 0)
        End If
Next shp

Application.ScreenUpdating = True

End Sub