Changing the test of checkboxes (shapes) programmatically?
I'm afraid that doesn't work, because the texts *next to* the CheckBoxes (= shapes) are not msoTextBoxes, nor .Name, nor .AlternativeText. The texts I want to change are 'elements' of a Shapes.Range(Array("xxx")) object and can be selected with the .Select method, as can be seen in this working code snippet:
Sub change()
ActiveSheet.Shapes.Range(Array("Check Box 12")).Select
Selection.Characters.Text = "any_new_text"
End Sub
My purpose was to change all these 'elements' in one pass, but I don't know how to do that with VBA. I was thinking of a For... Next loop and would need som help to write that routine.
Kind regards
Dr
On 30-1-2013 15:50, Sheriff wrote:
If c.Type = msoTextBox Then
Debug.Print c.Name & " " & c.AlternativeText
End If
|