Dim frm As Form
Dim ctl As Control
Load Form1
Load Form2
[COLOR=green]'(Load all your forms here)[/color]
For Each frm In Forms
For Each ctl In frm.Controls
If TypeOf ctl Is CommandButton Then
MsgBox frm.Name & vbCrLf & ctl.Name
End If
Next ctl
Next frm