G
Greg Maxey
I am stumgling in the dark trying learn something to help a poster.
I have a Word document with some controls entered in the document using
the Control Toolbox. Specifically I have some options buttons named
Pass1 through Pass4.
I can run Sub Test1() to return the caption of Pass1. I can further
specifically (and I don't know if it is right or not) declare the
variable as a MSForms.OptionsButton and get the result using Sub
Test2(). What I can't figure out is how to cycle through each control
in the document and determine the caption.
It seems that there is no:
For each Ct in Me.Controls or Me.MSForms.OptionButtons or Me.Anything
that will work.
Can anyone help or confirm the quest is hopeless. Thanks.
Sub Test1()
Dim Ct
Set Ct = Me.Pass1
MsgBox Ct.Caption
End Sub
Sub Test2()
Dim Ct As MSForms.OptionButton
Set Ct = Me.Pass1
MsgBox Ct.Caption
End Sub
Sub Test3()
Dim Ct As MSForms.OptionButton
For Each Ct In Me (what would go here to get name of each OptionButton
in the form).
MsgBox Ct.Caption
Next
End Sub
I have a Word document with some controls entered in the document using
the Control Toolbox. Specifically I have some options buttons named
Pass1 through Pass4.
I can run Sub Test1() to return the caption of Pass1. I can further
specifically (and I don't know if it is right or not) declare the
variable as a MSForms.OptionsButton and get the result using Sub
Test2(). What I can't figure out is how to cycle through each control
in the document and determine the caption.
It seems that there is no:
For each Ct in Me.Controls or Me.MSForms.OptionButtons or Me.Anything
that will work.
Can anyone help or confirm the quest is hopeless. Thanks.
Sub Test1()
Dim Ct
Set Ct = Me.Pass1
MsgBox Ct.Caption
End Sub
Sub Test2()
Dim Ct As MSForms.OptionButton
Set Ct = Me.Pass1
MsgBox Ct.Caption
End Sub
Sub Test3()
Dim Ct As MSForms.OptionButton
For Each Ct In Me (what would go here to get name of each OptionButton
in the form).
MsgBox Ct.Caption
Next
End Sub