I have a program with a lot of Control boxes and I need to be able to get their Name, Linked Cell and Caption. The first 2 were easy, but Caption does not seem to work in the same way. Can anyone help please? Is there any way of just referring to checkboxes and not combo boxes for example ?
Sub CycleThroughCheckboxes()
Dim CB As Object
For Each DrawObj In ActiveSheet.DrawingObjects
CBName = CB.Name 'OK
CBLinkedCell = CB.LinkedCell 'OK
CBLinkedCell = CB.Caption ' Does not work
Call DoSomething(CBName, CBLinkedCell, CBLinkedCell)
Next CB
End Sub
Sub CycleThroughCheckboxes()
Dim CB As Object
For Each DrawObj In ActiveSheet.DrawingObjects
CBName = CB.Name 'OK
CBLinkedCell = CB.LinkedCell 'OK
CBLinkedCell = CB.Caption ' Does not work
Call DoSomething(CBName, CBLinkedCell, CBLinkedCell)
Next CB
End Sub