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
Best 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?
0
Answers
-
Hello Benny @3843399e-a0b7-4273-83ff-78596d2e1c98_deprecated_61259333-d8f5-4515-9763-5e2ef715478a,
Try
set hOrder = CreateObject("REDI.ORDER")
0 -
Hi Zoya thank you very much. Unfortunately I have tried that, and get the same error. Is it possible there is another name? One other question, I have only referenced the "Redi 1.0 Type Library" from this VBA project. Do you think I need some other reference to be able to instantiate the Order in this way? Thank you again for the help.
-Benny
0 -
Hi Benny @3843399e-a0b7-4273-83ff-78596d2e1c98_deprecated_61259333-d8f5-4515-9763-5e2ef715478a,
In my thinking, as you are able to reference the library in "New Order" call, you should have it installed and referenced properly.
Could you please confirm, if your REDIPlus was running and logged in, when you have tested?
0 -
Hi Zoya. Yes, I can confirm, REDIPlus was running and logged in when I did my test. I understand what you said, that if the library is referenced properly, the code "new Order" will work fine. However, I need to write code which works on systems which do not have the REDIPlus plugin. The code itself can (and should) fail to execute, because REDI is missing; however, the code must be able to *compile*, which is not possible with the "static type" approach you suggest. I need to use "CreateObject". Can you confirm your code CreateObject("REDI.ORDER") works on your system?
0 -
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.
Details:
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.
Regards,
-Benny
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 280 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 720 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛