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

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
functions

ResolvedVersion 2003

Anna has attended:
Excel VBA Intro Intermediate course
Access Advanced course
Access VBA course
Access VBA course

Functions

How do you create a function in VBA?

RE: Functions

Hi Anna

A Function always returns a value. The value is assigned to the name of the function

To create a function in VBA do the following:

[Public] Function FunctionName ([Argument list] as Type

Public Function Area (Length As Single, Width As Single) As Single

Area = Length * Width

End Function

Hope this helps

Carlos

Excel tip:

Showing all menu items

If you go into a pull down menu you usally find that you get a selection of items(this is the default) or sometimes everything. If you only get a selectiopn you have to go to the double arrows at the bottom of the menu and click it to get all of the hidden items.
To turn this off so that you always get everything, go to Tools / Customize / Options Tab / "Always show full menus". Make sure there is a tick in the box and you will always have every item.

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.