Jul 15, 2002 #1 edelman Instructor Jun 7, 2002 12 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 Aug 30, 2000 1,177 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