View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Nigel RS[_2_] Nigel RS[_2_] is offline
external usenet poster
 
Posts: 80
Default Userform listing

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