Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

String Functions

  • Last UpdatedJul 18, 2023
  • 1 minute read

VBA strings functions are provided to create, edit and implement strings within VBA code. The strings functions predefined in VBA are:

Asc

Returns a numeric value that is the ASCII code for the first character in a string.

Chr

Converts an ASCII number to a one character string.

InStr

Returns the character position of the first occurrence of string2 within string1.

LCase

Returns a copy of string in which all characters have been converted to lowercase.

Left, Left$

Returns the left most characters of a string parameter.

Len

Determines the number of characters in the string argument.

Line Input #

Reads a single line from an open sequential file and assigns it to a string variable.

LTrim

Strips any leading spaces from a string variable.

Mid

Returns a substring within a string.

Option Compare

Determines the default string comparison method.

Option Explicit

Forces explicit declaration of all variables.

Right

Returns the right most characters of a string parameter.

RTrim

Strips any trailing spaces from a string variable.

Space

Adds a specified number of spaces in a print statement.

StrComp

Returns a variant that is the result of the comparison of two strings.

String

Create a string that consists of one character repeated a specific number of times.

Trim

Strips any leading and trailing spaces from Str variable.

UCase

Returns a copy of string in which all characters have been converted to uppercase.

TitleResults for “How to create a CRG?”Also Available in