I know I have done somthing wrong but I can't realy figure it out my self so i need your guys/Girls Help.

I get a error when using this code

Private Const mailserver As String = txtMailServ.Text
Private Const Tobox As String = txtToMail.Text
Private Const Frombox As String = txtFromMail.Text
Private Const Subject As String = txtSubject.Text

as you might notice I would get an error on the txtMailServ.text and the Other text boxses.
How can i make it so that I would not get a compile error ?

need more info about the project just ask.

Thanks.


-Lumin