ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   RTD problems in Excel 2003 (https://www.excelbanter.com/excel-programming/399331-rtd-problems-excel-2003-a.html)

Anders Frafjord

RTD problems in Excel 2003
 
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



Mark Lincoln

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




Anders Frafjord[_2_]

RTD problems in Excel 2003
 
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

"Mark Lincoln" wrote in message
oups.com...
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






All times are GMT +1. The time now is 12:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com