Jul 15, 2002 #1 edelman Instructor Joined Jun 7, 2002 Messages 12 Location IL Hello i want same help : how can i run a function from Form 1 that is in form 2 thanks
Jul 15, 2002 #2 MarkSweetland MIS Joined Aug 30, 2000 Messages 1,177 Location US Make the Function in Form2 Public: ' Form2 ' assuming there is a TextBox on Form2 named txtSomeTextBox Public Function GetText() GetText = txtSomeTextBox.text End Function 'Form1 dim frm as new Form2 frm.txtSometextBox.text = "hello" msgbox frm.GetText() Mark Upvote 0 Downvote
Make the Function in Form2 Public: ' Form2 ' assuming there is a TextBox on Form2 named txtSomeTextBox Public Function GetText() GetText = txtSomeTextBox.text End Function 'Form1 dim frm as new Form2 frm.txtSometextBox.text = "hello" msgbox frm.GetText() Mark