View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Excel, Hash (#) in VBA Calculations

It is whats referred to as a Type Declaration Character.

It means that when the expression is evaluated, the number in front of the
type declaration character is treated as a specific data type instead of as
a Variant.

The type-declaration character for Double is the number sign (#).

The list of type declaration characters a
Integer %
Long &
Currency @
Single !
Double #
String $

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"SMS - John Howard" wrote in message
...
Hi Folks,

I have recently inherited care of an Excel XP model that contains the
following calculations, containing the # symbol.

Amount = Amount / 100#
NewValue = OldValue * -1#

I can see where the variables Amount, NewValue and Old Value are declared
but nothing on the #.

The end results sor t of make sense if the # symbols were in fact the %
sign. Other than that I am totally confused.

Does this use of the # symbol make sense to anyone.

TIA

John Howard
Sydney, Australia