Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Neat way of avoiding the loading issue. thanks
-- Cheers Nigel "Peter T" <peter_t@discussions wrote in message ... Sub test() Dim oVBP As Object ' VBProject Dim oCmp As Object ' VBComponent Dim ctl As Control For Each oCmp In ThisWorkbook.VBProject.VBComponents If oCmp.Type = 3& Then ' userform module Debug.Print oCmp.Name For Each ctl In oCmp.designer.Controls Debug.Print , ctl.Name Next End If Next End Sub You would need Trust access to VBProjects but not necessary to load the forms Regards, Peter T "Nigel RS" wrote in message ... Hi All I am trying to list all userform controls. Part of this process requires that I also show the userform name and caption. In testing I discover an anomoly, that I cannot resolve - the first test below works and correctly prints the userform name and caption. the second does not work - can someone explain why please? ' this works Debug.Print ufReport.Name, ufReport.Caption ' this does not work? Dim uf As UserForm Load ufReport For Each uf In UserForms Debug.Print uf.Name, uf.Caption Next Unload ufReport |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Listing names and id and corresponding software | Excel Worksheet Functions | |||
Userform listing | Excel Programming | |||
Listing all userform controls | Excel Programming | |||
Listing the names of your worksheets | Excel Discussion (Misc queries) | |||
Listing of Sheet names | Excel Worksheet Functions |