Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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))
)
)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...