Excel DDE Embedded reference

Hi Folks
I have the following DDE link in a cell in a spreadsheet:

=RSLINX|TOPIC_NAME!TAG_NAME

This works correctly :-)

Is it possible to get the topic and tag names from another cell ?
Something like:

=RSLINX| & Sheet1.Range("A1") & "!" & Sheet1.Range("A2")

Regards Simon
SimonEngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
Hi,
pls try
=INDIRECT("=RSLINX|"&A1&"!"&A2)

Open in new window

Regards
0
SimonEngineerAuthor Commented:
Unfortunately this is not working for me. Here is the code that does not work:
Capture-1.PNG
0
SimonEngineerAuthor Commented:
This is the code that does work:
Capture-2.PNG
0
SimonEngineerAuthor Commented:
I have found a method of doing it that works for my application.
By putting the string creation into a sub and running it at startup it works correctly.

Sub MakeDDEFormulas()

    Sheet2.Cells(2, 3).Formula = "=RSLINX|" & Sheet1.Cells(2, 2) & "!" & Sheet1.Cells(2, 1) & ".I2.IP001"

End Sub

The important difference about embedding the code into a cell as opposed to running a VBA function is that once the DDE is embedded into the cell it becomes an active link and updates automatically when the values in the source change.
For my application I am not continually changing the tag name in the spreadsheet but using a separate workbook for each instance that I need to read data from, this now allows me to enter the Tag and Topic values only once for each worksheet.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MacroShadowCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: Simon (https:#a42399071)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

MacroShadow
Experts-Exchange Cleanup Volunteer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DDE

From novice to tech pro — start learning today.