Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Viveka Fischer   on Feb 21 In MS Office Category.

  
Question Answered By: Ulfah Hashmi   on Feb 21

Let's put it a little more clearly. + is best regarded as a mathematical
operator for addition. Using it for string  work is possible merely for
convenience and as a left over from the earliest VB versions in which string
variables were always cast using the $ symbol and it was relatively easy for
the programmer to see he was mixing data types. If you attempt to use it
with a combination of string and non-string data, you're going to have
problems. The error  you will get from this operation is "Type Mismatch" and
the understanding you should have from that error is that an operation was
attempted using at least 2 different data types.

So, the understanding to take is:
Ampersand is the native string concatenator for all the pre-.Net VB
variations. + is best left for math work.

Share: 

 

This Question has 10 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on how to concatenate string variables Or get search suggestion and latest updates.


Tagged: