Loop through all the controls of Userform

     

  • Though this code user can loop through all the controls which exists on USERFORM
  • It displays all the control Names on Message box
  •  

    Sub Loop_Through_All_The_Controls_In_Userform()
    Dim ctr As Control
    For Each ctr In UserForm1.Controls
    MsgBox ctr.Name
    Next
    End Sub

    Download The Workbook