vba菜单加载
我按照下面代码怎么老出现错误Sub Ch6_InsertMenu() ' 定义当前菜单组的变量
Dim currMenuGroup As AcadMenuGroup
Set currMenuGroup = ThisDrawing.Application. _
MenuGroups.Item(0) ' 创建新菜单
Dim newMenu As AcadPopupMenu
Set newMenu = currMenuGroup.Menus.Add("TestMenu") ' 声明表示菜单项的变量
Dim newMenuItem As AcadPopupMenuItem
Dim openMacro As String ' 指定宏字符串“ESC ESC _open”的 VB 等价值 ' 并创建菜单项
openMacro = Chr(3) + Chr(3) + "_open "
Set newMenuItem = newMenu.AddMenuItem(newMenu.Count + 1, _
"Open", openMacro) ' 在菜单栏上显示菜单
currMenuGroup.Menus.InsertMenuInMenuBar "TestMenu", ""
End Sub
并且不显示新菜单??怎么回事
页:
[1]