What's the difference between Trim() and Trim$() in VBA?

后端 未结 4 1955
眼角桃花
眼角桃花 2020-12-09 04:29

What is the difference between trim and trim$ in vba? Accidentally today when I used left and trim functions in vba, The compiler said cant f

4条回答
  •  情深已故
    2020-12-09 05:32

    I believe the notation is a legacy of VB days, where $ was used to denote objects/functions that were (or operated on) strings.

    Functionally, there's no difference although I understand that the $ version is alleged to be faster, as it eliminates the need to convert from a variant to a string.

提交回复
热议问题