Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User Defined Forumulas in VBA. How do I do it?
Message
De
20/11/2003 08:24:58
 
 
À
13/11/2003 05:33:13
Information générale
Forum:
Visual Basic
Catégorie:
VBA
Divers
Thread ID:
00849441
Message ID:
00851820
Vues:
11
>Hi All,
>
>I do remember that in previous versions of Excel it was theoritacally possible to write your own formula and call it from any cell the same way one calls a built-in forumula. All this without having to trigger a macro manually. Is it still possible with Office 2000 version of Excel? If yes, how can it be done?
>
>Thanks in advance,
>
>Jonathan

Yes it is still possible:
Create a new workbook (xls file) and save it

From Excel Menu:
Tools->Macro->Visual Basic Editor

From VB Editor menu:
Insert->Module

Double click on Module1 added in project explorer pane.
Type your VBA function, e.g.:
Public Function PI2()
PI2 = 355 / 113
End Function

Use your function, like you will use any other native Excel function.
Hope This Helps
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform