Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Run time error '5300' : Application-defined or object-defined error

Latest post Tue, Jul 20 2010 7:30 AM by mishs81. 0 replies.
  • Tue, Jul 20 2010 7:30 AM

    • mishs81
    • Not Ranked
    • Joined on Tue, Jul 20 2010
    • Posts 1
    • Points 5

    Run time error '5300' : Application-defined or object-defined error

     

    Hi,

    I am facing a strange issue in my VBA code of excel application.

    It is working fine in all the machine but it is throwing error in one of the user's machine.

     

    i have pasted the code below where it is throwing error while calling a webservice

     

    Run time error '5300' : Application-defined or object-defined error

     

    Dim connection As New ADODB.connection

        Dim rs As New ADODB.Recordset

        Dim sql As String

     

        connection.Open ICOS_CONNECTION

        sql = "SELECT OBJ_ID AS Location_ID FROM OBJ_TBL_OBJECTS WHERE OBJ_TYPID = 42 " & _

              "AND OBJ_ID IN(SELECT DISTINCT OBJDET_Trade_EntryPointID FROM OBJ_TBL_OBJECTS, " & _

              "OBJ_TBL_OBJECTS_DETAILS WHERE OBJ_ID = OBJDET_OBJID AND OBJ_TYPID in (75, 76))"

        rs.Open sql, connection

        Do While Not rs.EOF

            Call objSClient.iCosPositionbySingleLocationsRequest(rs.Fields("Location_ID"), start, ende, True)

            rs.MoveNext

        Loop

        rs.Close

        connection.Close

     

        Set objSClient = Nothing

       

    It is throwing error at the point highlightes in Bold letters.

    Run time error '5300' : Application-defined or object-defined error

     Please can someone have a look into this on urgent basis.

    Thanks

    • Post Points: 5
Page 1 of 1 (1 items) | RSS
Copyright Excel User Group and the relevant contributors, 2010. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.