Strange issue with ExcelArgument

31 views
Skip to first unread message

Niels Kristensen

unread,
Nov 9, 2022, 12:58:11 AM11/9/22
to Excel-DNA
I think I must be doing something stupid.  The following function definition returns #VALUE! and won't even go into the debugger.  

But if I remove the line for the 4th argument (Resolution) then it works fine.

Any assistance would be appreciated.


    <ExcelFunction(Category:="Opsdata", Name:="Opsdata.Test", Description:="Returns the Opsdata tag value for the specified period")>

    Public Function Test(<ExcelArgument(Name:="TagID", Description:="Opsdata tag ID to calculate")> TagID _

                , <ExcelArgument(Name:="DateFrom", Description:="Start date for the calculation")> DateFrom _

                , <ExcelArgument(Name:="DateTo", Description:="End date for the calculation")> DateTo _

                , <ExcelArgument(Name:="Resolution", Description:="Resolution interval to use, e.g. D for daily, W for weekly, M for monthly, Y for yearly, etc")> Resolution _

                , <ExcelArgument(Name:="SeriesID", Description:="Opsdata series ID, e.g. 0 for actuals, 1 for budget, 2 for forecast, etc")> SeriesID

                ) As Object


        Dim ureturn As Object


        ureturn = 1234


        Return ureturn


    End Function



Niels Kristensen

unread,
Nov 9, 2022, 8:12:02 AM11/9/22
to Excel-DNA
I managed to resolve the issue by upgrading to latest Excel beta version.

I am running Windows 11 ARM in Parallels VM on Mac M1, and it seems there was a known issue there with arguments, which is fixed by the latest beta release of Excel.

Reply all
Reply to author
Forward
0 new messages