Search notes:

VBA: attribute VB_Description

The VB_Description attribute allows to add a description to a subs and functions.
A modules that uses attributes must be inserted into a VBA project, not copy pasted.
attribute vb_name = "DescribeSubsAndFunctions"
option explicit

sub thisIsASub()
    attribute thisIsASub.vb_description = "This is the sub's description"
    debug.print "thisIsASub"
end sub

function thisIsAFunction as string
    attribute thisIsAFunction.vb_description = "This is the function's description"
    thisIsAFunction = "foo bar baz"
end function
Github repository about-VBA, path: /attribute/DescribeSubsAndFunctions.bas
After inserting the module, the description of the sub or function can be viewed by pressing F2:

Index