hi,
i have a lot of menus in my aplication now i want list all menus with the following code:

For i = 0 To Me.Controls.Count - 1

Next i

this detect all the controls in the program but now i want know what controls are menu and others that not.
there is same sintax like Controls(1).type = command1 or Controls(1).type = check1 the objective is select all the menus and change the values: visible, enabled etc in runtime

thanks for the help
bruno

For Each ctrl In Controls
    If TypeOf ctrl Is Menu Then
         msgbox ctrl.name & " is a Menu!"
    End If
Next ctrl
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.