Here is my function code that prompts a user when they submit a form and have a specific checkbox marked. It returns as error "object required" on the activecell.offset line when i add Name.Caption in the inputbox. I want this function to work for all checkboxes and use the Caption value in the checkbox property.

Public Function CheckBox(Name As Variant)

Static Counter As Integer

Counter = Counter + 1

If Name = True Then

Name = MsgBox("Do you want a specific" & Chr(32) & Name.Caption & "?", vbYesNo)

If Name = vbYes Then

ActiveCell.Offset(0, Counter).Value = InputBox("Enter" & Chr(32) & Name.Caption, "E.g." & Name.Caption)

End If
End If


End Function