Richard and L,
I gave the code a try and have encountered another error:
-2147023186: Automation error
The object universal unique identifier (UUID) was not found.
Again, any experiences with this error or ideas would be appreciated.
Thanks,
Greg
>Greg,
>
>I loop through the MB applications collection because I've found it hard to
>predict the correct case of all the characters in the string used to
>identify the application. Executing a loop like this in break mode will
let
>you see exactly whats going on too.
>
> For Each obj In objMapInfo.MBApplications
>
> If UCase(obj.Name) = "DATTOMAP.MBX" Then
>
> Set mbApp = obj
> Exit For
> End If
> Next
>
>Richard Burkmar
>ICL
>
>
>>I have run into a problem on a users system which is very annoying. I
have
>>a code which uses VB for the user interface, and MB to do the work in
>>MapInfo. The error occurs while I am establishing the 'connection'
between
>>VB and MapBasic. My code goes as follows:
>>
>>Public objMapInfo As Object
>>Public mbApp As Object
>>Public globinfo As Object
>>
>>Sub Main
>>
>> Set objMapInfo = GetObject(, "MapInfo.Application")
>> objMapInfo.Do "Run Application """ & App.Path & "\dattomap.mbx"""
>>>>> Set mbApp = objMapInfo.MBApplications.Item("dattomap.mbx")
>> Set globinfo = mbApp.MBGlobals
>>
>>My error occurs on the Set mbApp statement. I have the error trapped and
>>have put a timer on the error in case the mbx hasn't had time to execute.
>>My error trap allows about 60 seconds to pass which should be more then
>>enough time for the mbx to basically open and go into a wait state due to
>>the remote message handler in the code.
>>
>>I have noted the number of mbapplications (msgbox
>>objMapInfo.MBApplications.count) and it reports the correct # of mb apps.
>>When I attempt to note the names of the MBApplications(msgbox
>>objMapInfo.MBApplications.Item(1).Name ), the code fails.
>>
>>The VB error I keep getting is (-2147417851) which is basically saying
'the
>>server threw an exception'.
>>
>>This code works fine on 90% of my users systems. This error is occuring
on
>>a WinNT system where MI is local and the other mb applications run on a
>>server.
>>
>>Any thoughts or comments would be appreciated as I am out of guesses on
this
>>one.
>>
>>Thanks,
>>
>>Greg Toothaker
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]