February 24, 200718 yr I have a VBasic program that calls a run script via ActiveX. for the most part it runs fine, but since I have both FMP versions 6 and 8.5 installed, The ActiveX activates the Version 6 copy of FMP sometimes. If I reboot and then run FMP Ver 8.5 it works fine. as soon as I run ver 6, its continues to try and call it. The program then crashes, debuging reports a Runtime error '13': Type mismatch on the following line: Set FMApp = CreateObject("FMPro.Application") FMApp is defines as follows: Dim FMApp As FMPro70Lib.Application Has anyone had this problem or a suggestion on fixing it? With fingers crossed, Charles
February 25, 200718 yr the problem is with this call: Set FMApp = CreateObject("FMPro.Application") Because of the way FM implemented this it will always open or hook into the version of FM that was last opened manually. So you don't have to reboot to fix it, just close all FileMaker copies and launch 8.5. All calls will now go there. You don't need this call in a real VB app though, you can do something like: set FMapp = new FMPro70.Lib.application Which gets around the whole problem. The Createobject call is more useful in VBscripts.
February 25, 200718 yr Author GREAT! That seems to be the problem, I really appriciate your help Wim Charles
Create an account or sign in to comment