Home Forums HTBasic Forum unexpected error 7 “undefined Function or Subprogram”

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9410
    Paolo Ceroni
    Participant

      Hello,
      suddenly I’m having a problem on a system that was working normally up to some time ago.
      Now when I launch a program that reads data from an Excel file, it stops with error message “ERROR 7 IN XXXX Undefined Function or Subprogram”.
      I made no modifications to the code – maybe some Windows updates interfere witn HTBasic?
      Please note that I’m not a professional programmer so I hardly understand the code, mostly I use it to automate calculations.
      The error line is

      CALL Ddeinit(Result)

      what upsets me is, eveything worked fine up to a few months ago
      Note: I’m using a pc with Windows 10 and HTBasic version 10.0.2

      Many thanks for any help or suggestion.

      #9411
      RalphW
      Participant

        The error message indicates that the function “Ddeinit” does not exist in the program. This would imply that the program has become corrupted or inadvertently modified. Do you have a backup copy? If not, to further diagnose or to help confirm this suspicion, we would need to see a listing of your code. You can email it to htbsupport@transera.com.

        #9412
        Paolo Ceroni
        Participant

          Thank you very much for your quick answer.
          I have backup copy of the program but it gives the same error.
          Unfortunately I cannot share the program, it’s property of the company.
          What I can do is copying the lines that – to me – seem related to the issue. As said, I need to open and read data from an Excel file. This should be done via DDE connection to that file, using a software from Tech Soft:

          3210 Ddeinfo$=””
          3220 IF NOT INMEM(“Ddeinit”) THEN
          3230 MASS STORAGE IS “C:\GAIA\PROGRAMMI”
          3240 LOADSUB ALL FROM “htb8dde.csb”
          3250 END IF
          3260 CALL Ddeinit(Result)

          the program runs well up to line 3250. at the end of the code I can see a list of CSUBs added by line 3240:

          CSUB Ddeinit(INTEGER Result)
          CSUB Ddeconnect(INTEGER Channel,Service$,Topic$)
          CSUB Dderequest(INTEGER Channel,Item$,Buf$,INTEGER Result)
          CSUB Ddeinfo(Info$,INTEGER Result)
          CSUB Ddepoke(INTEGER Channel,Item$,Poke$,INTEGER Result)
          CSUB Ddeexecute(INTEGER Channel,Commd$,INTEGER Result)
          CSUB Ddeclean(INTEGER Result)
          CSUB Ddeterminate(INTEGER Channel,INTEGER Result)
          CSUB Ddetimeout(INTEGER Newtimeout,INTEGER Result)
          CSUB Dderequestl(INTEGER Channel,Item$,Buf$(*),INTEGER Result)
          CSUB Ddegetlocale(INTEGER Lctype,Lcdata$,INTEGER Result)

          but I cannot see any instructions there.
          Thank you again in advance. and sorry for my poor comprehension of coding

          #9415
          ZeRider
          Participant

            Hi Paolo,
            “htb8dde.csb” is a tool from the MS Office interface

            The best way may be to ask them directly why you are encountering this unexpected error

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.
          Scroll to Top
          HTB icon

          Please Sign In