且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

VBA-用户窗体新实例

更新时间:2023-11-30 16:09:22

您需要在 diagramGUI 用户窗体中添加一个公共变量,以指向MainUserForm的实例.

You need to add a public variable in the diagramGUI userform to point the the instance of MainUserForm.

将此行添加到 diagramGUI 代码模块

 Public Controller as MainUserForm 

然后实例化然后创建新的 diagramGUI

Then set the reference from the MainUserForm after you instantiate then new diagramGUI

 Dim newInstance As New diagramGUI
 Set newInstance.Controller = Me
 newInstance.Show vbModeless