Sub testcontrol1()Dim ctFor Each ct In Me.Controls If TypeName(ct) = "CommandButton" Then MsgBox ct.CaptionNextEnd Sub