LibreOffice 7.3 ヘルプ
指定された文字コードに対応する文字を返します。
Chr[$](expression As Integer) As String
String
Expression: 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), Expression 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. と表示されます。
End Sub