Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Dollar signs in VBA

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 336
Default Dollar signs in VBA

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?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Dollar signs in VBA

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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Dollar signs in VBA

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" wrote in message
oups.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?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Dollar signs in VBA

Thank you.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
In Excel, what do the dollar signs mean in $A$1 pso827 Excel Worksheet Functions 4 April 3rd 23 12:14 PM
Dollar signs on all tabs scpa Excel Discussion (Misc queries) 4 July 15th 09 11:23 PM
adding dollar signs peppica New Users to Excel 1 February 20th 06 08:26 PM
Dollar signs Lee New Users to Excel 4 August 25th 05 09:23 PM
Dollar SIgns in Formulas Mascot Excel Discussion (Misc queries) 4 May 13th 05 06:28 PM


All times are GMT +1. The time now is 11:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"