I've been searching hours to figure this out.
I need to pass the value of a textbox (FirstNametextbox) to a variable then use this variable in another form.
I used to be able to do a Textbox1.text = form1.textbox.text but that doesn't work. I've tried setting up a public var in Form1: Public Var1 as string = FirstNametextbox.text. then on form2 using it like textbox1 = var1. That didn't work either. Tried a buch of other stuff I found around the net but still no dice so I'm here.
this is a partial code but I think you can tell where I need to place the variable
Any help PLEASE
I need to pass the value of a textbox (FirstNametextbox) to a variable then use this variable in another form.
I used to be able to do a Textbox1.text = form1.textbox.text but that doesn't work. I've tried setting up a public var in Form1: Public Var1 as string = FirstNametextbox.text. then on form2 using it like textbox1 = var1. That didn't work either. Tried a buch of other stuff I found around the net but still no dice so I'm here.
Code:
oDoc.Unprotect()
oDoc.Bookmarks("t1").Range.Text = Projects.FirstNameTextBox.text ''''<-------this is where I need the variable passed to. Projects is the other Form name
oDoc.Protect(Word.WdProtectionType.wdAllowOnlyFormFields)Any help PLEASE