Skip to content

Problem with XLPMacroOptions2010 #14

@EricE

Description

@EricE

Hi Eric,
I was getting an error in this sub when importing UDFS (in Excel 2010), "Method 'MacroOptions' of object '_Application' failed". I tracked it down to a verbose doc string; it looks like desc can only be 255 characters long. I've made the below fix and life is good:

Sub XLPMacroOptions2010(macroName As String, desc, argdescs() As String)
If Len(desc) > 255 Then
    desc = Left$(desc, 255)
End If
    Application.MacroOptions macroName, Description:=desc, ArgumentDescriptions:=argdescs
End Sub

Thanks for the good work,
Eric

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions