在VBA里如何实现快速命令?
<p>如题,在LISP里实现起来很容易,用“c:function name”就能做快速命令,在VBA里要如何实现?</p><p>在帮助里没找到,但是发现用VALX类可以实现执行LISP语句,在LISP里再嵌套VBA函数这样是否可行?</p> 哪位 大大头注一下。。。 <p>Private Sub addcommand()<br/>ThisDrawing.SendCommand "(defun C:AZJ() (command " & Chr(34) & "-vbarun" & Chr(34) & Chr(32) & Chr(34) & "azjmjsj" & Chr(34) & "))" & Chr(32)<br/>ThisDrawing.SendCommand "(defun C:ABC() (command " & Chr(34) & "-vbarun" & Chr(34) & Chr(32) & Chr(34) & "abcde" & Chr(34) & "))" & Chr(32)<br/>End Sub</p><p>Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)<br/>If StrComp(Left$(CommandName, 3), "VBA", 1) <> 0 And UCase$(CommandName) <> "APPLOAD" Then Exit Sub<br/>addcommand<br/>End Sub</p><p>Private Sub AcadDocument_EndCommand(ByVal CommandName As String)<br/>If StrComp(Left$(CommandName, 3), "VBA", 1) <> 0 And UCase$(CommandName) <> "APPLOAD" Then Exit Sub<br/>addcommand<br/>End Sub</p><p>****************************************************************************<br/>西北凡人: http://www.abofanyi.com/blog</p> 感谢楼上的提供!我试试先! 没有看到置顶的贴子吗?
页:
[1]