Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

vba

ResolvedVersion 2003

Rafia has attended:
Excel Advanced course
Excel VBA Intro Intermediate course

VBA

Convert formulae into macros

RE: VBA

Hi Rafia

I guess you want to know if you can create some code that automatically does a calculation without showing the user how it was done

For this I suggest creating a Function. To do this:

In a Module write

Public Function MyFunctionName (Val1 As <Type>, Val2 As <Type>, etc) As <Type>

MyFunctionName = <<The calculation required>>

End Function


Then use the function as any other function in your workbook.

Hope this helps

Carlos

Tue 16 Dec 2008: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Using basic functions without doing formulas

When you highlight figures Autocalc tells you the total in the bottom right of the screen, but if you right click on the sum it will give you some basic functions. The functions are Min, Max, Average, Sum, Count, and Count Nums.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.