Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Excel 中有组合框,并且有以下 VBA 代码。但是现在打开excel时可以工作。
Sub worksheet_activate() mapping.clear mapping.Additem "File to Table" mapping.Additem "Table to File" End Sub
现在,告诉我如何在打开 excel 时自动加载组合框。
当我这样做时,它起作用了。在工作表宏中执行此操作。
Private Sub Workbook_Open() With Sheet1.mapping .AddItem "File to Table" .AddItem "Table to File" End With End Sub