You are partially correct. For all String functions (Dir, Mid, Format,
etc.), if you include the $ sign at the end of the function name, that
function will return a value of type String. However, if you don't include
the $ sign, the function will return a Variant with a sub-type of String.
The only time including the $ sign will really matter is if you use the
String function in a very large loop... Variants take up more memory (which
probably won't matter if you are assigning the output to a variable declared
as a String) and are slower to work with, so (in a large loop) the this
slowness will become measurable.
Rick
> hi Stefi,
> i used the code from my code collection, where i copied some
[quoted text clipped - 16 lines]
>> By the way, what does the $ sign means in Dir$ function? XL Help doesn't
>> mention this format.
Stefi - 30 May 2008 10:53 GMT
Thanks Rick for the explanation!
Stefi
„Rick Rothstein (MVP - VB)” ezt írta:
> You are partially correct. For all String functions (Dir, Mid, Format,
> etc.), if you include the $ sign at the end of the function name, that
[quoted text clipped - 28 lines]
> >> By the way, what does the $ sign means in Dir$ function? XL Help doesn't
> >> mention this format.
stefan onken - 30 May 2008 10:56 GMT
thank you!
stefan
On 30 Mai, 10:57, "Rick Rothstein \(MVP - VB\)"
<rick.newsNO.S...@NO.SPAMverizon.net> wrote:
> You are partially correct. For all String functions (Dir, Mid, Format,
> etc.), if you include the $ sign at the end of the function name, that
[quoted text clipped - 7 lines]
>
> Rick