简体   繁体   中英

Excel Macro button not show macro with parameter

I am new to Excel macro, I try to write a testing macro named Test without parameter, and then in Excel workbook, press the macro button, the testing macro is shown as follow:

在此处输入图片说明

在此处输入图片说明

but if I add a parameter to the macro Test as

Public Sub Test(var1 As String)

then when I return to the workbook, press the macro button, the Test macro is not shown, why? Is macro cannot with parameter?

在此处输入图片说明

在此处输入图片说明

该宏未显示,因为您已强制将参数作为过程的一部分进行传递,从而使该过程无法独立运行。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM