MikeDutcher
Technical User
I am an actuary, competent in app development but not by formal training.
15 years on the mainframe, pcs now strong enough to use instead.
I want to create functions that I can use from Excel or Access.
I have Visual Basic 6.0 and Office 2000.
Here's how far I've gotten. Suppose the function I want to create converts Fahrenheit to Celsius:
In VB I wrote the following code:
Public Function FtoC(Fahrenheit As Double) As Double
FtoC = 5 * (Fahrenheit - 32) / 9
End Function
Out of this code I made a DLL.
I pointed Excel & Access to the DLL library, but they could not "find" the function unless I put the following in a VBA module:
Function GetTemp(Temp As Double) As Double
GetTemp = FtoC(Temp)
End Function
Now to my question:
How can I avoid using VBA as a middle man to get to the FtoC function?
I want the Excel cell to be =FtoC(50)
rather than =GetTemp(50)
As it stands, it seems like I'm doing more work (& will have more to maintain)than I should have to.
15 years on the mainframe, pcs now strong enough to use instead.
I want to create functions that I can use from Excel or Access.
I have Visual Basic 6.0 and Office 2000.
Here's how far I've gotten. Suppose the function I want to create converts Fahrenheit to Celsius:
In VB I wrote the following code:
Public Function FtoC(Fahrenheit As Double) As Double
FtoC = 5 * (Fahrenheit - 32) / 9
End Function
Out of this code I made a DLL.
I pointed Excel & Access to the DLL library, but they could not "find" the function unless I put the following in a VBA module:
Function GetTemp(Temp As Double) As Double
GetTemp = FtoC(Temp)
End Function
Now to my question:
How can I avoid using VBA as a middle man to get to the FtoC function?
I want the Excel cell to be =FtoC(50)
rather than =GetTemp(50)
As it stands, it seems like I'm doing more work (& will have more to maintain)than I should have to.