Local lnPosControl, lnButtons, lcMsg lcMsg = "" lnButtons = 0 For lnPosControl = 1 To ThisForm.tBars.ControlCount If ThisForm.tBars.Controls(lnPosControl).Class = "CommandButton" lnButtons = lnButtons + 1 lcMsg = lcMsg + Iif(Empty(lcMsg), "", Chr(13)) + ; ThisForm.tBars.Controls(lnPosControl).Name + " - " + ; Iif(ThisForm.tBars.Controls(lnPosControl).Enabled, ; "Enabled", "Disabled") Endif EndFor Messagebox(AllTrim(Str(lnButtons)) + " buttons")Bye!