从一个用户界面跳到另外一个界面的程序
我想设计一个用户界面 先是输入用户名和密码点击确定按钮后 跳出另一个界面
如何建立这样的连接呢 程序怎么写?
Option Explicit Public LoginSucceeded As Boolean Private Sub cmdCancel_Click() 'set the global var to false 'to denote a failed login LoginSucceeded = False Me.Hide End Sub Private Sub cmdOK_Click() 'check for correct password If txtPassword = "password" Then 'place code to here to pass the 'success to the calling sub 'setting a global var is the easiest LoginSucceeded = True Me.Hide Form1.Show Else MsgBox "Invalid Password, try again!", , "Login" txtPassword.SetFocus SendKeys "{Home}+{End}" End If End Sub