98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Defining variables
Defining variables
Resolved · Low Priority · Version 2003
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
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Adding Rows or Columns in an Excel 2010 WorksheetIf you want to add a row to an Excel spreadsheet, these are the simple steps you should take: |