Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User Defined Forumulas in VBA. How do I do it?
Message
From
20/11/2003 08:24:58
 
 
To
13/11/2003 05:33:13
General information
Forum:
Visual Basic
Category:
VBA
Miscellaneous
Thread ID:
00849441
Message ID:
00851820
Views:
12
>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!

Previous
Reply
Map
View

Click here to load this message in the networking platform