RobertB
6th March 2007, 11:25
Hi all,

I've created an AFS "project" consisting of an Excel/VBA file and a custom session in Baan. All runs well on my test machine, where the following VBA code creates a VBA-global object:

Set oBaanObj = CreateObject("Baan.Application.SpecialServerLogin")
However, whe we came to install this Excel file on another machine where the "SpecialServerLogin" BWC client has also been configured, we encountered an error where the VBA oBaanObj object could not be initialized. Investigation quickly showed that, although the BWC had been configured by our admin correctly, the "Automation" tab-page on the BWC client configuration window revealed that the Class Name for this client had been saved as "Baan.Application.SpecialServerLogin.1" - note the ".1" at the end.

Firstly, we suspect that this fourth part to the class name is not accepable to the Excel/VBA "automation engine", and hence the object cannot be created; and secondly, that we have no idea where the ".1" comes from, and no idea of how to remove it, or prevent it from appearing in the Class Name.

The question is: has anybody else here come across this problem, and do they know how to fix it?

TIA,
Rob

Al Smith
6th March 2007, 21:52
Hi,
Usually the .# after the class name is the current version of multi-version classes.
I didn't think Baan created multi-version automation objects but to determine if this is indeed the case, you'll have to explore the registry in the machine.

Warning: Incorrectly editing the registry may severely damage your system.

If you're comfortable doing this:

Run regedit.exe
Expand the HKCR tree.
Scroll down to the Baan.Application... keys.
There will be a Baan.Application... key for each bwc on the machine.

There also may be orphaned Baan.Application... keys for bwc's that no longer exist.
When a bwc is removed from a machine, its automation object is not un-registered.

The next steps to take depend on what you find with the above process.

Al.

RobertB
14th March 2007, 08:16
Hi Al,

Sorry for the delay - I had a few days vacation. I'll have to wait until tomorrow until our admin guy gets back from a meeting, then we'll try your suggestions. Understand, as programmer, I'm not allowed to touch anything in kase I scruw sumthin up reel bad :rolleyes:

Rob

RobertB
16th March 2007, 08:45
Hi Al,

Your tip proved to be correct - we cleared out the orphaned registry entries and all is running OK - thanks!

Rob