VBA Interface Error:Unable to run macro

Hello, 

Company wide we are having macro issues. We are all using:

Windows 7

MS V8I SS2 v8.11.7.443

Microsoft Office 2010

We operate on MDT CADSTDDs but have our own modified configuration file. Their macros have been created on a Windows XP OS and an unknown version of Microsoft Office. 

When we try to execute a macro, we are encountered with error messages such as: 

VBA interface error: unable to run macro - project, module, or macro not found

VBA interface error: could not find project or project file

In some instances we are encountered by errors such as this: 

Oddly, a co-worker's macros started working today as I post this. Has anyone else ran across this issue before? I have my suspicions that the root cause could be a compatibility issue with the macros created on an older platform and trying to run on a newer, updated VBA interface. 

Any help is appreciated, 

Vinny

  • Unknown said:
    VBA interface error: could not find project or project file

    If you open the VBA Project Manager (MicroStation menu Utilities|Macros) do you see the projects listed?  If not, you need to adjust configuration variable MS_VBASEARCHDIRECTORIES to include the correct location of your VBA project files.

    Unknown said:
    ...trying to run on a newer, updated VBA interface

    What do you mean by 'updated VBA interface'?

     
    Regards, Jon Summers
    LA Solutions

  • Regards

    Frank

    since 1985: GIS, CAD, Engineering (Civil)  Senior Consultant : [Autodesk Civil 3D , Esri ArcGIS, VertiGIS: in previous days : Bentley MS V4 - V8i, GeoGraphics, Bentley Map V8i, InRoads,  HHK Geograf, IBr DAVID] :  Dev: [C, C++, .NET, Java, SQL, FORTRAN, UML]
    [direct quote by: http://en.wikipedia.org/wiki/Helmut_Schmidt]: "Wer Kritik übel nimmt, hat etwas zu verbergen"
    Wer Grammatik- und/oder Rechtschreibfehler findet, der darf sie behalten :-)

  • From my understanding (which is very minimal) is that when Microsoft Office is updated, VBA updates as well?

    The configuration variable sounds very promising. I will give it a try as well as look through Frank_Klein's post as well.

    Thanks for the help!

  • I was able to get the macros going this morning. MDT uses 1 UCF file whereas we have individual UCF files. Comparing them side by side, I found that I was missing a line of code:

    MS_VBA_OPEN_IN_MEMORY   = all

    MS_VBASEARCHDIRECTORIES       = $(MDOHDIR)workspace/programs/vba/

    ***MS_VBASEARCHDIRECTORIES       > $(MDOHDIR)workspace/programs/vba/v8i/***

    MS_VBANEWPROJECTDIRECTORY = $(MDOHDIR)workspace/programs/vba/

    MS_VBAAUTOLOADPROJECTS         = $(mdohdir)workspace/programs/vba/mdtprjmanager.mvba

    MS_VBAAUTOLOADPROJECTS         > $(mdohdir)workspace/programs/vba/mdttraffic.MVBA

    MS_MACRO                                                   = $(MDOHDIR)workspace/PROGRAMS/MACRO/

    MS_MACRO                                 > $(Pref)

    once it was added the macros worked!

    Answer Verified By: vmorasko71 

  • I ran into this today, along with issues with toolbox sizing. I don't know what changed overnight. I know that the search directory was correct. and I can load the VBA from the VBA project manager. but I got the above error when trying to load from the command line. this one routine (angleassistant) is supposed to load on start, which it didn't and I noticed it when the command to invoke the routine errored.