资讯

In that case, VBA skips this step and continues with the next workbook. The code must skip the Personal.xlsb workbook because if it closes, it also stops running, perhaps leaving workbooks open.
7. From the Macros In dropdown, choose This Workbook (Figure H). Figure H Choose the VBA procedure. To execute the procedure, simply click the shape. There are many ways to run a VBA sub procedure.
Open the macro that you want to run your code. For example, if the code must run when a user clicks "Button1," open the "Button1_Click" macro.