Passing String variable within a string argument

G

Guest

I have an argument in another VBA software other than an Office product that
requires string arguments as key-ins. While in the string argument I am
trying to pass a variable from a listbox. However the argument somehow I
believe reads the variable from the listbox as a string itself. So I have a
string inside a string! I know many people run into this problem. How do I
take off the quotes for the variable to return just a non-quoted string so my
argument will run? Thanks.

Option Explicit

MicroStationDGN.CadInputQueue.SendKeyin "reference levels on &
lstReflvlfile.List(R) & *"";SELVIEW ALL"

Where the variable lstReflvlfile is my value from my listbox. Thanks!

Kou
 
S

Stefan Hoffmann

hi,

Kou said:
Option Explicit

MicroStationDGN.CadInputQueue.SendKeyin "reference levels on &
lstReflvlfile.List(R) & *"";SELVIEW ALL"

Where the variable lstReflvlfile is my value from my listbox. Thanks!
Not sure wether i understand you, but try:

MicroStationDGN.CadInputQueue.SendKeyin _
"reference levels on " & lstReflvlfile.List(R) & "*"";SELVIEW ALL"
^^^ ^^^


mfG
--> stefan <--
 

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