microstation中,如何利用VBA在菜单栏目增加一些button和屏蔽一些button
1.代码
Application.CommandBars.Add "InsertPrice", msoBarTop
Application.CommandBars("InsertPrice").Visible = True
Application.CommandBars("InsertPrice").Protection = msoBarNoMove + msoBarNoCustomize
Set Control1 = Application.CommandBars("InsertPrice").Controls.Add(msoControlButton, 1)
Control1.Caption = "数据导入"
Control1.OnAction = "insertData"
Control1.Visible = True
2.手工
Workspace->Customize->MenuBar
Key IN:VBA RUN MAIN(BasMain.checkIn)
Application.CommandBars.Add "InsertPrice", msoBarTop
Application.CommandBars("InsertPrice").Visible = True
Application.CommandBars("InsertPrice").Protection = msoBarNoMove + msoBarNoCustomize
Set Control1 = Application.CommandBars("InsertPrice").Controls.Add(msoControlButton, 1)
Control1.Caption = "数据导入"
Control1.OnAction = "insertData"
Control1.Visible = True
2.手工
Workspace->Customize->MenuBar
Key IN:VBA RUN MAIN(BasMain.checkIn)