Redi Excel VBA, late-binding Redi Type Library

Hello, I was given example Excel VBA code to automate Redi order entry. It works by creating a new object of type "Order", like this:

set hOrder = new Order

I need a late-binding equivalent to this code, but I cannot determine the proper qualified classname to pass to the CreateObject method. When I try this:

set hOrder = CreateObject("RediLib.Order")

I get the error message: "ActiveX component can't create object"

I believe I must be using the wrong qualified-name. Can you please inform me how to do this? I need this code late-binding so it will compile (but not work, which is fine) on machines without Redi Type Library.

Thank you,

-Benny

Tagged:

Best Answer

  • zoya faberov
    zoya faberov ✭✭✭✭✭
    Answer ✓

    Hi @3843399e-a0b7-4273-83ff-78596d2e1c98,

    Yes, able to create object. And to verify myself, I just went and again created

    Dim hOrder
    Set hOrder = CreateObject("REDI.ORDER")

    Now, trying to think why it may not work for you.

    Static order creation works for you, so REDI library is installed on your machine.

    Have you updated REDI lately?

    You may need to re-register using api.reg file as discussed in REDI Quickstart.

    After you do, restart Excel before testing.

    To explain my thinking on what may be missing:

    • REDI tlb should be present
    • Added as reference to project (if any shade of doubt, uncheck reference and re-add it via "browse")
    • Registered via REG into windows registry (see Quickstart step 5)

    Let us know how this works for you?

Answers