Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Nick
Got it! I will have to adjust the code to use outside the userform in question but it works ok now Cheers Nigel "NickHK" wrote: Nigel, This works for me: Dim obj As Control For Each obj In Me.Controls Debug.Print obj.Name, obj.Caption Next You should add error handling and/or test that the control is a type that has a .Caption first NickHK "Nigel RS" wrote in message ... Hi Nick I am actaully creating soem documentation and at the same time creating a list of ALL controls and their captions, particularly Command Buttons and Labels, as these will be then subject to changing dynamically through an lok up process. Ther first task was to get the list of all controls on all forms (a total of over 500). Which I did not wnat to do manually! I have utilised the controls collection and the userfroms collection (after loading all forms). But do not seem to be able to get the captions? Cheers "NickHK" wrote: Having reread your question, you get the userform to list its own details using its .Controls collection: Dim obj As Object For Each obj In Me.Controls Debug.Print obj.Name, TypeName(obj) Next The userform obviously has to be loaded for this to work. NickHK "Nigel RS" wrote in message ... Anyone have code or know of a utility to list all userforms and controls types and captions on a worksheet? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Listing Application Userform Contents | Excel Programming | |||
Listing all userform controls | Excel Programming | |||
DSN Listing | Excel Programming | |||
sum and listing | Excel Discussion (Misc queries) | |||
Listing of one cell controlling the listing of another cell. | Excel Programming |