Home > Net >  VBA User defined subroutine description
VBA User defined subroutine description

Time:12-12

Do you know what is the limit of chars for the Description argument of the Application.MacroOptions method. There is no official info here: https://docs.microsoft.com/en-us/office/vba/api/excel.application.macrooptions

CodePudding user response:

You can test this pretty quickly. I got an error once n passed 255.

Function TestMacro()
    MsgBox ActiveWorkbook.Name
End Function
 

Sub AddUDFToCustomCategory()
    Dim n As Long
    For n = 1 To 500
        Application.MacroOptions Macro:="TestMacro", Description:=String(n, "x")
    Next n
End Sub
  • Related