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