Hannah has attended:
Excel VBA Intro Intermediate course
Defining variables
what is a string.
RE: defining variables
Hi Hannah
When declaring varalbles one variable type is a String.
A string is a character or a combination of characters that constitute text of any kind and almost any length.
So to declare a string variable you write the following:
Dim UserName As String
Text-based controls such as the TextBox, the ListBox, or the ComboBox controls, have a property called Text. This property is of type String.
So when using such a control, to access the string that it holds you call its Text property. So if you have a text box with the user name you would code
UserName = txtUserName.Text
Hope this helps
Carlos