3 ms·
Actually it’s not. This is to call any other macro (function), the first argument is the name of the macro as a string, and the other arguments are the paramete
by cm2187 5y ago
Actually it’s not. This is to call any other macro (function), the first argument is the name of the macro as a string, and the other arguments are the parameters that will be provided to that macro, which can be of any type and have any name. So it kinds of need to be that way.
- saagarjha 5y agoRight, so this would be something like Application.Run(macro: Object, arguments: Object...) which would clean it up nicely.
- cm2187 5y agoThat’s what the definition a bit further down the page says. The header of the page seems to be the function signature so it doesn’t contain any name.
- saagarjha 5y agoIn languages with argument labels, they are part of the signature and show up in the call site.
- trynumber9 5y agoC# does have optional named parameters (see link below). But it is little help here as this is an old COM library for Excel. The documentation says named parameters are not supported for this method, which is a COM interop limitation but not a limitation of the C# language. https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/named-and-optional-arguments https://docs.microsoft.com/en-us/dotnet/csharp/programming-g...