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.
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:
Let us know how this works for you?
Hello Zoya, thank you very much for all the help with this. Your last ideas were very helpful, and I was able to resolve the issue.
I was not able to access the Quickstart link, because I am not an "API Family Member" even though I have requested the membership a few times. However, I was able to find that document elsewhere.
Unfortunately, I was also not able to access the "api.reg" file, as I do not know the credentials for that FTP resource (ftp://ftp.slk.com/sdk.reg).
Finally, the Quickstart guide recommended the "Install Excel Add-In" action from "Tools" in the Redi Login window. Although I already had the add-in installed, when I ran that installer (which presumably also executes the Registry modification), I was then able to create the object Dynamically per your example.
Thank you again very much for this help.