Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Function prototypes in Excel VBA
Dear Excel VBA Gurus,
Is there any function prototypes equivalent in Excel VBA as there are in C language? Function prototypes are useful because it allows the programmer to see what are the functions implemented in a file at the top. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Function prototypes in Excel VBA
No, there are not.
-- Regards, Tom Ogilvy "Sing" wrote: Dear Excel VBA Gurus, Is there any function prototypes equivalent in Excel VBA as there are in C language? Function prototypes are useful because it allows the programmer to see what are the functions implemented in a file at the top. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Function prototypes in Excel VBA
Maybe(?) look at the two drop downs at the top of modules in the VBE.
For more info, arguments etc - select your project in the left panel F2 Object Browser in libraries (the top drop down) select your project name. Regards, Peter T "Sing" wrote in message ... Dear Excel VBA Gurus, Is there any function prototypes equivalent in Excel VBA as there are in C language? Function prototypes are useful because it allows the programmer to see what are the functions implemented in a file at the top. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Function prototypes in Excel VBA
Peter,
In my experience, C function prototypes show how the function is calculated - not what the inputs are. There is no equipvalent in VB or VBA unless you know something else. -- regards, Tom Ogilvy "Peter T" wrote: Maybe(?) look at the two drop downs at the top of modules in the VBE. For more info, arguments etc - select your project in the left panel F2 Object Browser in libraries (the top drop down) select your project name. Regards, Peter T "Sing" wrote in message ... Dear Excel VBA Gurus, Is there any function prototypes equivalent in Excel VBA as there are in C language? Function prototypes are useful because it allows the programmer to see what are the functions implemented in a file at the top. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Function prototypes in Excel VBA
Thanks for that Tom,
unless you know something else. Nope ! Regards, Peter T "Tom Ogilvy" wrote in message Peter, In my experience, C function prototypes show how the function is calculated - not what the inputs are. There is no equipvalent in VB or VBA unless you know something else. -- regards, Tom Ogilvy "Peter T" wrote: <snip |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Function prototypes in Excel VBA
My quick search of the web gave several examples similar to the following:
float doubleIt(float inVal); ...which is effectively just the top line of code of the routine, which lists the arguments, their return types, and the return type of the routine. The Object Browser in VBA would essentially perform the same functionality. I think you would have to have a flowchart (and possibly diagrams, like data flow and/or event flow) to show the algorithm of how a function is calculated. -- Regards, Bill Renaud |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Function prototypes in Excel VBA
Is your question really about "header files"? VBA does not use header files
(that list all functions, their arguments, return types, etc.), because this is just extra work for the programmer and can lead to errors. In C, if a programmer changes the main code file, and forgets to change the header file, then a compile error results. In VBA, you open up the project that has the routines that you want to inspect, then go into the Object Browser (<F2 key in the VBA Editor), select the Library in the Library drop-down combo box, then inspect the methods and properties, as mentioned in a previous post by Peter T. -- Regards, Bill Renaud |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Data Validation/Lookup function does function correcty | Excel Worksheet Functions | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
Excel - User Defined Function Error: This function takes no argume | Excel Programming | |||
Adding a custom function to the default excel function list | Excel Programming | |||
When I Import an Access Table With an Excel Function in a Cell it Displays as Text not as a Function in Excel | Excel Programming |