View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mark Lincoln Mark Lincoln is offline
external usenet poster
 
Posts: 227
Default RTD problems in Excel 2003

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

On Oct 15, 10:14 am, "Anders Frafjord"
wrote:
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