![]() |
#1
|
|||
|
|||
![]()
I have several macros created with forms that have about 100 objects on the form. The objects are all named the default "checkbox1, optionbutton10", but are identified in the "Caption" field in properties. Can I get a list of the objects, and their captions for each form?
Thanks. |
#2
|
|||
|
|||
![]()
You do not state what you want to do with this list. Write to another document perhaps. In any case this may help you get started.
Code:
Sub ListCaptions() Dim oCtl As MSForms.Control For Each oCtl In UserForm1.Controls If TypeOf oCtl Is MSForms.CheckBox Or _ TypeOf oCtl Is MSForms.Label Or _ TypeOf oCtl Is MSForms.OptionButton Then MsgBox oCtl.Name & vbTab & oCtl.Caption End If Next End Sub |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add custom doc properties in "Doc properties control" | eazysnatch | Word | 2 | 09-13-2017 08:08 PM |
![]() |
sumjoh | Word VBA | 1 | 01-29-2013 08:38 PM |
How to Query Text in MS-Excel 2010 or Import Data & Query outside of Excel? | mag | Excel | 0 | 10-18-2012 11:15 AM |
![]() |
Space Cowboy | PowerPoint | 4 | 10-04-2010 07:14 PM |
NOprintable objects | shadowbat | Drawing and Graphics | 0 | 07-05-2010 10:13 PM |