RTD problems in Excel 2003

A

Anders Frafjord

Hi,

I'm having some troubles getting data via RTD to an Excel spreadsheet. If I
enter "=RTD("orchestrator.rtdserver";;"ds 1") into cell B1, I'm getting
data. But how to write a code line in VBA to do the same?

Cells(1, 1).Value = Application.RTD("orchestrator.rtdserver", vbNullString,
"DS 1") gives an error code 1004 Application-defined or object-defined error
Cells(1, 1).Value = RTD("orchestrator.rtdserver", vbNullString, "DS 1")
highlights RTD and tells me "function or sub not defined

Regards,

Anders Frafjord
 
M

Mark Lincoln

This is from VBA Help:

RTD Method

This method connects to a source to receive real-time data.

expression.RTD (progID, server, topic1, topic2, topic3, topic4,
topic5, topic6, topic7, topic8, topic9, topic10, topic11, topic12,
topic13, topic14, topic15, topic16, topic17, topic18, topic19,
topic20, topic21, topic22, topic23, topic24, topic25, topic26,
topic27, topic28)

expression Required. An expression that returns one of the objects
in the Applies To list.

progID Required Variant. A string representing the real-time server
programmatic identifier.

server Required Variant. A server name, Null string or
vbNullString constant.

topic1 Required Variant. A String representing a topic.

topic2-topic28 Optional Variant. A String representing a topic.

Remarks
The server argument is required in Visual Basic for Applications
(VBA), even though it can be omitted within a worksheet.

Mark Lincoln
 
A

Anders Frafjord

I've read in VBA Help, I've googled, but I can't find the answer.

Based on this help, I would guess I had to write the code like this:
Cells(1, 1).Value = Application.RTD("orchestrator.rtdserver", vbNullString,
"DS 1")

But, like I said, that gives me an error message. The RTD-server service is
started, I've also added the servers exe-file to the preferences list in
VBA.

Running Windows XP Pro.

Any ideas?

Anders
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top