String – Introduction

The Basics
If you have completed a hello word example then you have seen a string.  You can do many interesting things with strings but lets start with the basics.
To declare a string and set its value

dim myfirst as string
myfirst = "abc123"

Join 2 string together

dim mysecond as string
mysecond = "efg123"
msgbox myfirst & " " & mysecond

Remember to place the code in a sub routine. Here is the code below

Sub stringcombine()
   Dim myfirststring As String
   myfirst = "abc123"
   Dim mysecond As String
   mysecond = "efg123"
   MsgBox myfirst & " " & mysecond
End Sub

String Basics
String Basics

Leave a Reply

Your email address will not be published. Required fields are marked *