Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
str() 関数を使用して整数を文字列に変換しています
しかし、str() 関数が余分な文字を文字列に返すことに気付きました。
たとえば、MsgBox(Len(str(1)))2 が返されます。
MsgBox(Len(str(1)))
追加される余分な文字は何ですか?
Excel 2010 のヘルプから:
「数値が文字列に変換される場合、先頭のスペースは常に数値の符号用に予約されています。数値が正の場合、返される文字列には先頭のスペースが含まれ、プラス記号が暗示されます。」
そして、確かに、このステートメントはデバッグ ウィンドウで True を返します。
? left(str(1),1) = " "