Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Simple String Question


I have a VBA application that needs to look at a certain cell in orde
to identify the topic for DDE communications. I think I am somehow no
declaring my string properly.

Dim Array1 As Integer
Dim Row As Integer
Dim AnInput As Integer
Dim DDETopic As String


DDETopic = Worksheets("Set Points").Range("L4").Value

Import = DDEInitiate("RSLinx", "DDETopic")

Where DDE Topic is the value in cell L4 of sheet "Set Points". When
run the macro it gives me an error that says RSLinx isnt running.
However, if i just put the correct topic name in place of DDETopi
everything works fine. Am I declaring the string DDETopic correctly

--
pete358
-----------------------------------------------------------------------
pete3589's Profile: http://www.excelforum.com/member.php...fo&userid=2840
View this thread: http://www.excelforum.com/showthread.php?threadid=57416

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Simple String Question

You are certainly declaring it as a string, but it is the next line that is
wrong, it should be

Import = DDEInitiate("RSLinx", DDETopic)

otherwise you are passing the string value DDETopic, not the value of the
variable DDETopic.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"pete3589" wrote in
message ...

I have a VBA application that needs to look at a certain cell in order
to identify the topic for DDE communications. I think I am somehow not
declaring my string properly.

Dim Array1 As Integer
Dim Row As Integer
Dim AnInput As Integer
Dim DDETopic As String


DDETopic = Worksheets("Set Points").Range("L4").Value

Import = DDEInitiate("RSLinx", "DDETopic")

Where DDE Topic is the value in cell L4 of sheet "Set Points". When I
run the macro it gives me an error that says RSLinx isnt running.
However, if i just put the correct topic name in place of DDETopic
everything works fine. Am I declaring the string DDETopic correctly?


--
pete3589
------------------------------------------------------------------------
pete3589's Profile:

http://www.excelforum.com/member.php...o&userid=28402
View this thread: http://www.excelforum.com/showthread...hreadid=574163



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Simple String Question

pls modify ur code:

Import = DDEInitiate("RSLinx", DDETopic)


"pete3589" wrote:


I have a VBA application that needs to look at a certain cell in order
to identify the topic for DDE communications. I think I am somehow not
declaring my string properly.

Dim Array1 As Integer
Dim Row As Integer
Dim AnInput As Integer
Dim DDETopic As String


DDETopic = Worksheets("Set Points").Range("L4").Value

Import = DDEInitiate("RSLinx", "DDETopic")

Where DDE Topic is the value in cell L4 of sheet "Set Points". When I
run the macro it gives me an error that says RSLinx isnt running.
However, if i just put the correct topic name in place of DDETopic
everything works fine. Am I declaring the string DDETopic correctly?


--
pete3589
------------------------------------------------------------------------
pete3589's Profile: http://www.excelforum.com/member.php...o&userid=28402
View this thread: http://www.excelforum.com/showthread...hreadid=574163


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Simple String Question


Thanks for the help, that appears to have worked, except now I get
popup that asks what DDE link to use, and it gives me some pre-existin
links that I have created using my DDE client (RSLinx).

This is probably a long shot, but does anyone know how to not have thi
pop up and just use the exact text that is shown in the given cell

--
pete358
-----------------------------------------------------------------------
pete3589's Profile: http://www.excelforum.com/member.php...fo&userid=2840
View this thread: http://www.excelforum.com/showthread.php?threadid=57416

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need simple formula to find one string in another Eric_NY Excel Discussion (Misc queries) 4 July 16th 09 09:08 PM
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
Simple String Conversion - HELP prepotency[_3_] Excel Programming 4 June 10th 05 02:56 PM
simple question, hopefully a simple answer! Matt B Excel Programming 5 January 13th 04 08:43 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"