Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Symbol # after numbers

Hi, I found a code that uses the symbol # after some numbers, what is the
function of this?

This is part of the code

If N < 2 Or beta <= 0# Or beta = 1# Or Alpha <= 0# Or Alpha = 1# Then
Tol2 = CDbl(CVErr(xlErrValue))
Exit Function
End If
c = 1# / Sqr(2# * 3.14159265358979)

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Symbol # after numbers

It just defines the data type. It helps to keep VBA from getting confused.
--
Gary''s Student - gsnu200909


"Marcus" wrote:

Hi, I found a code that uses the symbol # after some numbers, what is the
function of this?

This is part of the code

If N < 2 Or beta <= 0# Or beta = 1# Or Alpha <= 0# Or Alpha = 1# Then
Tol2 = CDbl(CVErr(xlErrValue))
Exit Function
End If
c = 1# / Sqr(2# * 3.14159265358979)

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 489
Default Symbol # after numbers

That signifies significant digits. For example, if you type beta = 1.00000,
VBA will automatically revice the syntax to bets = 1#, but if you type beta
= 1, VBA leaves that syntax alone. Try it yourself. Hope this helps! If

so, let me know, click "YES" below.

--
Cheers,
Ryan


"Marcus" wrote:

Hi, I found a code that uses the symbol # after some numbers, what is the
function of this?

This is part of the code

If N < 2 Or beta <= 0# Or beta = 1# Or Alpha <= 0# Or Alpha = 1# Then
Tol2 = CDbl(CVErr(xlErrValue))
Exit Function
End If
c = 1# / Sqr(2# * 3.14159265358979)

Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 806
Default Symbol # after numbers

Hello,

Its just telling VBA that the constant is of type double so it does
not need to get casted (VBA will never get irritated :-)

# -- Double
% -- Integer
& -- Long
@ -- Currency
! -- Single
$ -- String

[found in the web]

Regards,
Bernd
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
Conditional Format Negative to Postiive Numbers w/3 Symbol Icon Se kms77 Excel Discussion (Misc queries) 2 March 4th 10 01:07 AM
How to print numbers invariably using dots as decimal symbol? Stefano Gatto Excel Programming 9 October 30th 09 01:53 PM
How do I add a symbol between numbers in a column? Deb Excel Worksheet Functions 7 November 11th 05 11:46 PM
In Format>Cell>Numbers>currency>Symbol Please add "Rs. India" Surendera M Bhanot Excel Worksheet Functions 0 August 22nd 05 02:12 PM
How do I insert the degree symbol in a column of numbers? JKB Excel Discussion (Misc queries) 3 July 6th 05 07:17 AM


All times are GMT +1. The time now is 09:01 PM.

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

About Us

"It's about Microsoft Excel"