Hello,
I want to do a small function in excel that will permit the user to retrieve information stored in a VBA module. I cannot find a function in VBA that will make VBA understand that this is a variable.
Here is my example:
Const Key199309 =20
Const Key199310 =25
Const Key199311 =30
Function Rates(ValYear As String, ValMonth As String)
Rates = "key" & ValYear & Month
End Function
This of course does not work...I tried to put a ME() but nothing worked...
So for example Rates(1993,09) would return me 20.
How can I achieve this!!
Thanks a lot
I want to do a small function in excel that will permit the user to retrieve information stored in a VBA module. I cannot find a function in VBA that will make VBA understand that this is a variable.
Here is my example:
Const Key199309 =20
Const Key199310 =25
Const Key199311 =30
Function Rates(ValYear As String, ValMonth As String)
Rates = "key" & ValYear & Month
End Function
This of course does not work...I tried to put a ME() but nothing worked...
So for example Rates(1993,09) would return me 20.
How can I achieve this!!
Thanks a lot
Last edited: