我对类模块不太熟悉,但我在网上找到了一个查询,但在我可以询问我遇到的问题之前,我需要知道如何正确地表达问题。使用伪代码来保持简单...
我有一个userform,它有一个变量声明:
Private m_ClsVariableName as ClsClassName
在UserForm_Intialize事件中,我有:
Set m_ClsVariableName = New ClsClassName
With m_ClsVariableName
Set .Subroutine1= Me.CmdButton1
Set .Subroutine2= Me.CmdButton2
Set .List = Me.Listbox1
End With
在课堂上我有这些声明:
Public WithEvents Subroutine1 As MSForms.CommandButton
Public WithEvents Subroutine2 As MSForms.CommandButton
Public List As MSForms.ListBox
使用set将类中的子例程或变量分配给userform上的控件(在本例中为2个命令按钮和列表框)的正确术语是什么?