excel wont launch brics

hi all, i have a program that launches brics from excel and then runs a macro from brics vba. as of a week ago excel leaves my bricscad reference (variable) as nothing

_this is my code _
On Error Resume Next
Set bcad = GetObject(, "BricscadApp.AcadApplication")
If Err <> 0 Then
errChk = False
Err.Clear
Set bcad = CreateObject("BricscadApp.AcadApplication")
End If

this code will launch a new instance of brics but will still leave the reference as nothing
If bcad Is Nothing Then
Set bcad = New AcadApplication
bcad.Visible = True
bcad.ActiveDocument.Utility.Prompt "hello"
End If

my references under References - VBAProject are
BricsCAD App 17.0 Type Library (x64)
BricsCAD Db 17.0 Type Library (x64)

these are the only Brics refeences available

Comments

  • I resolved this by closing both excel and brics and running them as admin.

  • At least in my v14 of Bricscad, adn in my Windows 7, enviromnent and its security setting, BricsCAD must be set to run as Administrator if you want to be able to configure it, and have the change set. And, if you want to permit one program to talk (i.e. send data) to another, or open another, both of the programs need to be set to run as administrator.

    It should be noted that Windows does not immediately sense a security violation, such as when a program requests another program to run that is set to run as administrator. So you program may work one time, and not another time.

    Unfortunately, at least in Windows 7, this means that every time one of those programs is run, it will ask you for permission to run. There is a way to bypass this, if you create a task for opening that program, and then use a shortcut to run the task. I have been using this for my desktop shortcuts to run those programs. But, there are differences. For example, in Excel if you want to start a new spreadsheet, you could have used the original desktop shortcut. But, with the task approach, it apparently does nothing. It doesn't even bring the currently running Excel to the top. I have no idea if task-shortcut would work with inter-program running. So, you may need to click "OK" on the permission window every time, or perhaps you may have to start BricsCAD first.

This discussion has been closed.