且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用VBA以编程方式向Excel工作表中添加几个按钮

更新时间:2023-10-12 23:48:58

每个块的前两行应为一:

Your first two lines of each block should be one:

With newWorkBook.Worksheets(1).Buttons.Add(350, 15, 173.25, 41.25)

因此您可以引用添加的 Button ,而不是 Buttons 集合.

so you get a reference to the added Button, not to the Buttons collection.