Run Time Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Run Time Error

    Hi All

    I receiving a run time error see below.

    I know the code works on two other systems with the same versions excel, windows and and PC Dmis.

    I'm using office 365 64 bit with excel version1902 the OS is Windows 10 64 bit and PC Dmis 2018 R2 SP4

    I receive this error only on this system when its trying to create the object. Set DmisApp = CreateObject("PCDLRN.Application")

    https://www.pcdmisforum.com/image/pn...BJRU5ErkJggg==



    Dim DmisApp As PCDLRN.Application
    Dim DmisParts As PCDLRN.PartPrograms
    Dim DmisPart As PCDLRN.PartProgram
    Dim DmisCmds As PCDLRN.Commands
    Dim DmisCmd As PCDLRN.Command
    Dim FeatCmd As Object

    Set DmisApp = CreateObject("PCDLRN.Application")



    I'm using office 365 with excel version1902 the OS is Windows 10 64 bit and PC Dmis 2018 R2 SP4

    Thanks
    Bill

  • #2
    What's the error?
    AndersI
    SW support - Hexagon Metrology Nordic AB

    Comment


    • #3
      Also what language is this in.

      I'm assuming VB6? (Not a script as you're defining object as specific types) and not .net because you're using Set for the object variable
      Applications Engineer
      Hexagon UK

      Comment


      • #4
        I use Excel VBA, but on windows 7 and with excel 2010. I could test on my windows 10 laptop to make sure nothings different between the two.

        I would check to make sure you're referencing the correct object library in excel.

        Also, are you using sub main () at the top? or is this the complete code

        Comment


        • #5
          Another thing to add is that I export my .bas straight from PC-DMIS part programs directly to get the formatting that PC-DMIS gives for the top section of code. I know there are multiple ways to skin a cat, so my method isn't absolute by any means. I noticed that the formatting might also be an issue.

          Code:
          Sub QuickPCDComment()
          
          Dim DmisApp As Object
          Dim DmisPart As Object
          Dim DmisCommands As Object
          Dim DmisCommand As Object
          
          
            Set DmisApp = CreateObject("PCDLRN.Application")
            Set DmisPart = DmisApp.ActivePartProgram
            Set DmisCommands = DmisPart.Commands
            Set DmisCommand = DmisPart.Command
          Last edited by CodeWarrior; 11-22-2019, 07:49 AM.

          Comment

          Related Topics

          Collapse

          Working...
          X