LibreOffice 24.8 Help
āĻāĻ˛ā§āĻ˛ā§āĻāĻŋāĻ¤ āĻ āĻā§āĻˇāĻ° āĻā§āĻĄ āĻ¸āĻāĻļā§āĻ˛āĻŋāĻˇā§āĻ āĻ āĻā§āĻˇāĻ° āĻĒā§āĻ°āĻĻāĻžāĻ¨ āĻāĻ°ā§ āĻĨāĻžāĻā§āĨ¤
Chr[$](charcode As Integer) As String
String
charcode: a numeric expression that represents a valid 8-bit ASCII value (0-255) or a 16-bit Unicode value. (To support expressions with a nominally negative argument like Chr(&H8000) in a backwards-compatible way, values in the range â32768 to â1 are internally mapped to the range 32768 to 65535.)
When VBA compatibility mode is enabled (Option VBASupport 1), charcode is a numeric expression that represents a valid 8-bit ASCII value (0-255) only.
Chr$ āĻĢāĻžāĻāĻļāĻ¨ āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ° āĻāĻ°ā§ āĻāĻāĻāĻŋ āĻŽā§āĻĻā§āĻ°āĻŖāĻ¯āĻ¨ā§āĻ¤ā§āĻ° āĻ āĻĨāĻŦāĻž āĻ āĻ¨ā§āĻ¯ āĻā§āĻ¨ āĻāĻāĻāĻĒā§āĻ āĻā§āĻ¸ā§ āĻŦāĻŋāĻļā§āĻˇ āĻāĻ¨ā§āĻā§āĻ°ā§āĻ˛ āĻā§āĻ°āĻŽ āĻĒā§āĻ°ā§āĻ°āĻŖ āĻāĻ°āĻž āĻšā§āĨ¤ āĻāĻāĻāĻŋ āĻ¸ā§āĻā§āĻ°āĻŋāĻ āĻāĻā§āĻ¸āĻĒā§āĻ°ā§āĻļāĻ¨ā§ āĻāĻĻā§āĻ§ā§āĻ¤āĻŋ āĻāĻŋāĻšā§āĻ¨ āĻ¸āĻ¨ā§āĻ¨āĻŋāĻŦā§āĻļ āĻāĻ°āĻžāĻ¨ā§āĻ° āĻāĻ¨ā§āĻ¯ āĻāĻāĻŋ āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ° āĻāĻ°āĻ¤ā§ āĻĒāĻžāĻ°ā§āĻ¨āĨ¤
An overflow error will occur when VBA compatibility mode is enabled and the expression value is greater than 255.
Sub ExampleChr
REM āĻāĻ āĻāĻĻāĻžāĻšāĻ°āĻŖāĻāĻŋāĻ° āĻŽāĻžāĻ§ā§āĻ¯āĻŽā§ āĻāĻāĻāĻŋ āĻ¸ā§āĻā§āĻ°āĻŋāĻ āĻ āĻāĻĻā§āĻ§ā§āĻ¤āĻŋāĻāĻ°āĻŖ āĻāĻŋāĻšā§āĻ¨ (ASCII āĻŽāĻžāĻ¨ 34) āĻ¸āĻ¨ā§āĻ¨āĻŋāĻŦā§āĻļ āĻāĻ°āĻžāĻ¨ā§ āĻšā§āĨ¤
MsgBox "A " + Chr$(34) + "short" + Chr(34) + " trip."
REM āĻĄāĻžā§āĻžāĻ˛āĻā§ āĻŽā§āĻĻā§āĻ°āĻ¨: A "short" trip āĻšāĻŋāĻ¸ā§āĻŦā§ āĻāĻŦāĻŋāĻ°ā§āĻā§āĻ¤ āĻšā§āĨ¤
MsgBox Chr(charcode := 64) ' "@" sign
End Sub