Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Sqr built-in function in Excel 2003 VBA

Hi:
I am seeing a discrepancy in Excel 2003 VBA
In the built-in Help , it lists the function Sqr as the VBA fucntion to
take the square root of a real argument. Notice that the S in Sqr is in
Upper Case. Similarly for other code examples within Excel and in David M.
Bourg's book, "Excel Scientific and Engineering Cookbook". But, when I am in
VBA inside of Excel it does not allow me to type (and keep) Sqr...it converts
the S to lower case s.
This works as a square root function, but is not the same syntax as Sqr.
Whiuch is correct ? Why does VBA's actual sytax (that used) not match what
is in the books, or the built-in Help ?

Another example that works correctly is the use of Tan() (with the upper
case T) for the tangent function.

Thank you

-DaleB
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 947
Default Sqr built-in function in Excel 2003 VBA

Hi. At the top of your vba module, try typing the following with the Proper
syntax.

Dim Sqr

All your Sqr functions should not correct itself.
Now, delete the above Dim statement.
Hope this fixes it. :)

--
Dana DeLouis


"DaleB" wrote in message
...
Hi:
I am seeing a discrepancy in Excel 2003 VBA
In the built-in Help , it lists the function Sqr as the VBA fucntion to
take the square root of a real argument. Notice that the S in Sqr is in
Upper Case. Similarly for other code examples within Excel and in David
M.
Bourg's book, "Excel Scientific and Engineering Cookbook". But, when I am
in
VBA inside of Excel it does not allow me to type (and keep) Sqr...it
converts
the S to lower case s.
This works as a square root function, but is not the same syntax as Sqr.
Whiuch is correct ? Why does VBA's actual sytax (that used) not match
what
is in the books, or the built-in Help ?

Another example that works correctly is the use of Tan() (with the upper
case T) for the tangent function.

Thank you

-DaleB



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Sqr built-in function in Excel 2003 VBA

Somewhere in your code, you defined sqr as a variable or method, so the
VBE retains the lowercase s throughout the project.

You should be able to fix this by, after removing any other definitions
of sqr, entering

Dim Sqr As Long

then delete it.


In article ,
DaleB wrote:

Hi:
I am seeing a discrepancy in Excel 2003 VBA
In the built-in Help , it lists the function Sqr as the VBA fucntion to
take the square root of a real argument. Notice that the S in Sqr is in
Upper Case. Similarly for other code examples within Excel and in David M.
Bourg's book, "Excel Scientific and Engineering Cookbook". But, when I am in
VBA inside of Excel it does not allow me to type (and keep) Sqr...it converts
the S to lower case s.
This works as a square root function, but is not the same syntax as Sqr.
Whiuch is correct ? Why does VBA's actual sytax (that used) not match what
is in the books, or the built-in Help ?

Another example that works correctly is the use of Tan() (with the upper
case T) for the tangent function.

Thank you

-DaleB

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Sqr built-in function in Excel 2003 VBA

Thanx !

"JE McGimpsey" wrote:

Somewhere in your code, you defined sqr as a variable or method, so the
VBE retains the lowercase s throughout the project.

You should be able to fix this by, after removing any other definitions
of sqr, entering

Dim Sqr As Long

then delete it.


In article ,
DaleB wrote:

Hi:
I am seeing a discrepancy in Excel 2003 VBA
In the built-in Help , it lists the function Sqr as the VBA fucntion to
take the square root of a real argument. Notice that the S in Sqr is in
Upper Case. Similarly for other code examples within Excel and in David M.
Bourg's book, "Excel Scientific and Engineering Cookbook". But, when I am in
VBA inside of Excel it does not allow me to type (and keep) Sqr...it converts
the S to lower case s.
This works as a square root function, but is not the same syntax as Sqr.
Whiuch is correct ? Why does VBA's actual sytax (that used) not match what
is in the books, or the built-in Help ?

Another example that works correctly is the use of Tan() (with the upper
case T) for the tangent function.

Thank you

-DaleB


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Sqr built-in function in Excel 2003 VBA

Thanx !

"Dana DeLouis" wrote:

Hi. At the top of your vba module, try typing the following with the Proper
syntax.

Dim Sqr

All your Sqr functions should not correct itself.
Now, delete the above Dim statement.
Hope this fixes it. :)

--
Dana DeLouis


"DaleB" wrote in message
...
Hi:
I am seeing a discrepancy in Excel 2003 VBA
In the built-in Help , it lists the function Sqr as the VBA fucntion to
take the square root of a real argument. Notice that the S in Sqr is in
Upper Case. Similarly for other code examples within Excel and in David
M.
Bourg's book, "Excel Scientific and Engineering Cookbook". But, when I am
in
VBA inside of Excel it does not allow me to type (and keep) Sqr...it
converts
the S to lower case s.
This works as a square root function, but is not the same syntax as Sqr.
Whiuch is correct ? Why does VBA's actual sytax (that used) not match
what
is in the books, or the built-in Help ?

Another example that works correctly is the use of Tan() (with the upper
case T) for the tangent function.

Thank you

-DaleB




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
Reference Previous Worksheet Built-in Function [email protected] Excel Worksheet Functions 1 July 6th 07 04:03 PM
Pie chart built in 2000, now in 2003 but unable to edit 2003-way Judith Rempel Excel Discussion (Misc queries) 0 September 21st 06 12:05 AM
Does Excel 2003 have Avrami equation built-in or available? Patco Excel Worksheet Functions 1 May 3rd 06 01:38 AM
Excel 2003 Built-in IRM Nicole Seibert Excel Discussion (Misc queries) 0 March 9th 06 06:54 PM
Excel that has built-in ruler... Myint Soe Oo Excel Discussion (Misc queries) 1 December 22nd 05 04:17 PM


All times are GMT +1. The time now is 12:26 AM.

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"