Chapter 1 A-Z Reference
14 IC Scripts VBA Scripting Reference
'The following example calls an external routine. Calling
'External routines is very specific to the platform--thus,
'we have different code for each platform.
#If Win16 Then
Declare Sub GetWindowsDirectory Lib "KERNEL" (ByVal _
DirName As String,ByVal MaxLen As Integer)
#ElseIf Win32 Then
Declare Sub GetWindowsDirectory Lib "KERNEL32" Alias _
"GetWindowsDirectoryA" (ByVal DirName As String,ByVal _
MaxLen As Long)
Dim DirName As String * 256
MsgBox "Windows directory = " & DirName
Description Returns the concatenation of
If both expressions are strings, then the type of the result is
. Otherwise, the type of the result
When nonstring expressions are encountered, each expression is converted to a
both expressions are
, then a
variant is returned. If only one expression is
, then it is
treated as a zero-length string.
variants are also treated as zero-length strings.
In many instances, the plus (
) operator can be used in place of
. The difference is that
addition when used with at least one numeric expression, whereas
'This example assigns a concatenated string to variable s$ and
'a string to s2$, then concatenates the two variables and
'displays the result in a dialog box.
s$ = "This string" & " is concatenated"
s2$ = " with the & operator."
MsgBox s$ & s2$
(operator); Operator Precedence (topic).