VBA MSFORMS vs Controls - whats the difference
问题 When adding controls to a userform, what is the difference between the following. I am confused as to when it is appropriate to use any particular one of these. Dim aButton1 as MSFORMS.CommandButton Dim aButton2 as Control.CommandButton Dim aButton3 as CommandButton 回答1: Add UserForm first . Then in VBA IDE press F2 , the object browser appears. In the upper left corner is combo box, select MSForms . In the classes list you can see the classes which belongs to MSForms object library. You can