What is the significance of some of the VBA functions having a
counterpart with a $. For example there is the Mid function and also
the Mid$ function. What is the difference?
What is the significance of some of the VBA functions having a
counterpart with a $. For example there is the Mid function and also
the Mid$ function. What is the difference?
As far as I know, it's just for backwards compatibility. Old versions of VBA
(such as Excel Basic and Word Basic) put a dollar at the end of every
string/text function. You don't have to bother putting it in now and many of
the functions have been improved to allow their use on more than just strings.
"Kletcho" wrote:
> What is the significance of some of the VBA functions having a
> counterpart with a $. For example there is the Mid function and also
> the Mid$ function. What is the difference?
>
>
Here an interesting discussion on it.
http://www.dailydoseofexcel.com/arch...on-efficiency/
Cheers
Andy
Martin wrote:
> As far as I know, it's just for backwards compatibility. Old versions of VBA
> (such as Excel Basic and Word Basic) put a dollar at the end of every
> string/text function. You don't have to bother putting it in now and many of
> the functions have been improved to allow their use on more than just strings.
>
> "Kletcho" wrote:
>
>
>>What is the significance of some of the VBA functions having a
>>counterpart with a $. For example there is the Mid function and also
>>the Mid$ function. What is the difference?
>>
>>
--
Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
Without the $ character, the function returns a Variant
containing a String. The $ character forces the function to
return a String type variable. Functions are more efficient with
the $.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Kletcho" <kletcho@gmail.com> wrote in message
news:1144769678.777227.139110@u72g2000cwu.googlegroups.com...
> What is the significance of some of the VBA functions having a
> counterpart with a $. For example there is the Mid function
> and also
> the Mid$ function. What is the difference?
>
Thank you.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks