Search code examples
vbaexcelms-word

Macros not showing up in the run macro menu


I started learning VBA and I don't understand why some macros copy-pasted from the internet do not show up in the run macro menu (Alt-F8).

Below there are 2 macros, but only the second one is showing. Why? And how do I fix it?

Sub Test1(ByVal Target As Hyperlink)

    '...

End Sub

Sub Test2()

    '...

End Sub

enter image description here enter image description here


Solution

  • Macros with arguments are not available in Macros list because they cannot be run alone instead they are called by another macro by passing the required arguments.