Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

2 easy ones

Posted on 2002-05-27
4
Medium Priority
?
158 Views
Last Modified: 2010-05-02

I'm moving and my office is all in boxes so I have no access to the help files.

First what is the syntax for the natural log function in VB and second how do I raise a variable to a power. For example X raised to the power of 3.


Thanks
0
Comment
Question by:bfeddish
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 18

Accepted Solution

by:
Crash2100 earned 300 total points
ID: 7037238
'To raise a variable to a power use the ^ for the exponent
x = y^3


Log Function
------------
Returns a Double specifying the natural logarithm of a number.

Syntax

Log(number)

The required numberargument is aDouble or any validnumeric expression greater than zero.

Remarks

The natural logarithm is the logarithm to the base e. Theconstant e is approximately 2.718282.

You can calculate base-n logarithms for any number x by dividing the natural logarithm of x by the natural logarithm of n as follows:

Logn(x) = Log(x) / Log(n)

The following example illustrates a custom Function that calculates base-10 logarithms:

Static Function Log10(X)
   Log10 = Log(X) / Log(10#)
End Function




Exp Function
------------
Returns a Double specifying e (the base of natural logarithms) raised to a power.

Syntax

Exp(number)

The required numberargument is aDouble or any validnumeric expression.

Remarks

If the value of number exceeds 709.782712893, an error occurs. Theconstant e is approximately 2.718282.

Note   The Exp function complements the action of the Log function and is sometimes referred to as the antilogarithm.

0
 
LVL 18

Expert Comment

by:Crash2100
ID: 7037246
You can also look this stuff up on microsoft's online version of msdn:
http://msdn.microsoft.com/library/default.asp
0
 
LVL 1

Author Comment

by:bfeddish
ID: 7037262

Thanks for the quick answer.

Bryan
0
 
LVL 18

Expert Comment

by:Crash2100
ID: 7037280
glad i could help
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question