Hi.
I apologize if this is not the right place to rise our problem.
Description: We are facing a problem related to VBA access in Bentley Map. Our setup is made over the network drive: we substitute the local C:\Program Files\Bentley\Bentley (Select Series v8i)\Microstation\config\msconfig.cfg with an extended one, that basically instructs Bentley Map to read many cfg files from network drive. The network drive is outside our local network (in a different city).
Problem: Occasionally, one of the VBA macro loaded into the setup fails to run. If we edit the macro, it says "Read only", and ask us to save it in a different location; even if this saving location is a local drive, the saved file is always 0 size. In the same Bentley Map session, if we create a new vba project, there are no problems editing/saving it. The part with "read only" can be understood if there are multiple users accessing the macro. But why it's not possible to save it elsewhere? From inside VBA, if we export the modules/forms/classes from this VBA on the local disk, they are saved.
We don't care giving write access for our operators, but we require them to execute it... I said occasionally, because at some point, after a while, the VBA starts to behave normally, on the same PC, with the same configuration, with the same references, etc. Therefore we know that the macro is fine. When we try to execute any function inside, it complains about "Could not load reference... reference not found", and the other thing is the one described above. We had checked all of the references, and they are ALL accessible from the local machine.
At this point, we are clueless about why this is happening. We are not even able to reproduce the problem... it just happens (frequently), and then dissapears. We would appreciate very much if anybody could point us to the right track to solve this issue.
Thanks a lot for paying attention to this problem.
Microsoft impose a default limit on the number of users who can have a VBA project running. The solution to this is discussed in VBA help
Search for the section MicroStation VBA Environment Variables. Look for the paragraphs that discuss MS_VBA_OPEN_IN_MEMORY.
Regards, Jon Summers LA Solutions
Thanks for following up.
I know about this article, this is why I have also suggested to reboot the server where the configuration stands. Even if operators don't use the actual project with the VBA in question, any other project still loads all the mvba files... they really want accessible all the "golden pieces" :) Rebooting the server will force closing down all connections, and then we'll know if we did pin down this issue.
Being a true multi-national company, it's not really at my hand to reboot that server, but based on your reply I'll insist on it and implement the ustn in_memory var. I'll come back with more informations later.
Kind regards,
Catalin.
I have not suggested rebooting your server. You may have found that recommendation in the Bentley VBA help. Adding a variable to your MicroStation configuration does not require a server reboot.
You can add the recommended configuration variable to a site or project configuration (.cfg) file. You can experiment locally by adding it to your user configuration (.ucf) file.
If the new variable works, then as your colleagues stop and restart MicroStation they will acquire the new settings. The change is adopted by MicroStation — a server reboot would achieve nothing.