Vba Strings & Characters - Built-in Constants.pdf

  • Uploaded by: Manoj Amogh Surya
  • 0
  • 0
  • October 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Vba Strings & Characters - Built-in Constants.pdf as PDF for free.

More details

  • Words: 260
  • Pages: 2
2017­5­31

VBA Strings & Characters ­ Built­in Constants

Built­in Constants Built­in constants are sometimes referred to as intrinsic constants. VBA.Constants

Chr

Comments

vbCr

Chr(13)

Carriage return character

vbLf

Chr(10)

Linefeed character

vbCrLf

Chr(13) + Chr(10)

Carriage return ­ linefeed combination

vbNewLine

Chr(13) + Chr(10)

New line character

vbNullChar

Chr(0)

Character having a value of 0.

vbNullString

String having value 0

Not the same as a zero­length string (""); used for calling external procedures. Cannot be passed to any DLL's

vbTab

Chr(9)

Tab character

vbBack

Chr(8)

Backspace character

vbFormFeed

Chr(12)

Word VBA Manual ­ manual page break ?

vbVerticalTab

Chr(11)

Word VBA Manual ­ manual line break (Shift + Enter)

vbNullChar This constant can be used to test for a null character. This can also be used for assigning a null character to a string variable. The vbNullChar constant can be useful when passing string variables to external libraries that require a null­terminated string. This constant should be used instead of Chr(0).

vbNullString This constant can be used for assigning a zero­length string. This can also be used to test for empty strings. For all practical purposes using a zero­length string ("") is equivalent to using vbNullString. A zero length string means a string with no characters vbNullString is a constant used for a null­pointer and is more efficient than a zero­length string The following four lines are all equivalent. Dim myString As String    myString = ""    myString = vbNullString 

http://bettersolutions.com/vba/strings­characters/builtin­constants.htm

1/2

2017­5­31

VBA Strings & Characters ­ Built­in Constants

myString = vbNullString    myString = Constants.vbNullString    myString = VBA.Constants.vbNullString 

http://bettersolutions.com/vba/strings­characters/builtin­constants.htm

2/2

Related Documents

Strings
April 2020 19
Strings
May 2020 23
Characters
June 2020 12
Characters
May 2020 21

More Documents from ""