If I would like to assign the value of a text box text's property to a string how owuld I do it?

Example:

dim str as string

str = text1.text

is this correct?