ever-eagle 发表于 2006-5-27 23:58:00

VBA 救助

<P>Sub AddASubMenu()</P>
<P>&nbsp;&nbsp;&nbsp; '获得当前的菜单组***********************<BR>&nbsp;&nbsp;&nbsp; Dim currMenuGroup As AcadMenuGroup<BR>&nbsp;&nbsp;&nbsp; Set currMenuGroup = ThisDrawing.Application.MenuGroups.Item(0)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; '创建新菜单<BR>&nbsp;&nbsp;&nbsp; Dim newMenu As AcadPopupMenu<BR>&nbsp;&nbsp;&nbsp; Set newMenu = currMenuGroup.Menus.Add("冲模")<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; '添加菜单项*****************************<BR>&nbsp;&nbsp;&nbsp; Dim macro As String<BR>&nbsp;&nbsp;&nbsp; macro = Chr(vbKeyEscape) + Chr(vbKeyEscape)<BR>&nbsp;&nbsp;&nbsp; '模座<BR>&nbsp;&nbsp;&nbsp; Dim menuItemHuamo As AcadPopupMenuItem<BR>&nbsp;&nbsp;&nbsp; Set menuItemHuamo = newMenu.AddMenuItem(newMenu.Count + 1, &amp; "模座", macro &amp; "?????")</P>
<P>'在菜单栏上显示菜单*******************<BR>&nbsp;&nbsp;&nbsp; newMenu.InsertInMenuBar (ThisDrawing.Application.MenuBar.Count + 1)<BR>&nbsp;&nbsp;&nbsp;&nbsp;<BR>End Sub</P>
<P>??处该怎样编写,窗体代码又该怎样写,才能使菜单和对话框连接起来呢? </P>
<P>有劳了!!</P>

我爱你++ 发表于 2007-9-3 10:44:00

我也有同样的问题,谁能帮忙解答

ljq 发表于 2007-10-2 03:42:00

<p>' 宏定义</p><p>sub pp()</p><p>form1.show</p><p>end sub</p><p>’???的写法</p><p>???="-vbarun pp"</p>
页: [1]
查看完整版本: VBA 救助