Table of Contents

VBC09344 — RSet allowed only on strings

Severity: Error  ·  Family: VBC (static semantics / abstract syntax tree)  ·  Source metadata: VBCompileErrorInfo

The target of an RSet statement is not a String.

RSet right-aligns a value in the characters a String already has. Unlike LSet, it does not copy user-defined types.

MS-VBA reports the same error, with the same message (recorded in Excel).

This code is raised by StatementStaticSemanticsEvaluator.

How it is raised

Situation Example Resolution
An RSet of a Long. RSet n = "x" Assign it with =, or declare the target as a String.

Notes

A Variant target compiles: what it holds is only known when the code runs.

See also


⏮️ VBC09343 LSet allowed only on strings and user-defined types | ⏭️ VBC09345 Invalid use of property


ACCUEIL • HOME | ℹ️ BIENVENUE • WELCOME | 🧩 BÂTISSONS • BUILD | RD-VBAL | SDK | 🌐 rubberduckvba.ca