functions

TrustPilot

starstarstarstarstar Excellent

  • Home
  • Courses
  • Promotions
  • Schedule
  • Formats
  • Our Clients

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Functions

Functions

resolvedResolved · Low Priority · Version 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:

Using Alt in Save Dialog Box

When you are saving (or opening) a file, try these;
(Note the numbers are on the keyboard not the numeric keypad)
1. Go to previous folder Alt+1
2. Go up one folder level Alt+2
3. Search the Web Alt+3
4. Delete selected file Alt+4 or Delete
5. Create a new folder Alt+5
6. Cycle through all views Alt+6 repeatedly
7. Display the Tools menu Alt+7

View all Excel hints and tips


Server loaded in 0.07 secs.