Article ID: 140464
Article Last Modified on 1/19/2007
Command button
--------------
Name: Command0
Caption: Form1_SayHi
OnClick: =Form1_SayHi()Public Form1Var as string
Function Form1_SayHi()
Form1Var = "Hi!"
MsgBox Form1Var
End Function
Command button:
Name: Command0
Caption: Form1_SayHi
OnClick: [Event Procedure]
Enter the following code in the event procedure for the OnClick
property:
[Form_Form1].Form1_SayHi
Create another command button on the Form2 form:
Name: Command1
Caption: Form2_ShowVar
OnClick: =Form2_ShowVar()
Function Form2_ShowVar()
MsgBox Form_Form1.Form1Var
End Function
Keywords: kbhowto kbprogramming KB140464