BIGAL Posted August 9, 2011 Posted August 9, 2011 A pretty simple problem we have a 3rd party program and it sometimes interrupts commands by displaying a message box and you have to press Ok to continue. It using some form of reactor. Using vbaman you can unload it, trying to find the correct sysntax to unload it from the command line/menu. Help please. Quote
BlackBox Posted August 9, 2011 Posted August 9, 2011 Give this thread a read. When I get in to work in the morning I should be able to tweak so a sub-function accepts a valid named VBA app (on my iPhone now). Edit: forgot to say see post #6. HTH Quote
BIGAL Posted August 10, 2011 Author Posted August 10, 2011 Thanks Renderman thought it would be easy just set full file name including path to a variable then (command "_vbaunload" vbaprogfiletoremove) the simple stuff is often hard to guess at. As I know the program name the code is only a defun with two lines. The code above helped though to find the full path name. Just added a princ and rem the command to see what was currently loaded (defun Get-VBA-Project-list ( / ACAD VBAO PRO N NAMES) (vl-load-com) (if (and (setq ACAD (vlax-get-acad-object)) (setq VBAO (vla-get-vbe ACAD)) (setq PROs (vlax-get VBAO "VBProjects")) ) (repeat (setq N (vla-get-count PROs)) (setq PRO (vla-item PROs N) NAMES (cons (list (vlax-get PRO "Name") (vlax-get PRO "FileName") ) NAMES) N (1- N) ) ) ) NAMES ) ) (defun C:UNVBA ( / app apps) (setq apps (Get-VBA-Project-List)) (foreach app apps ;(command "_VBAUNLOAD" (cadr app)) (princ (cadr app)) ) ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.