Shell command passing variable into

robertlewisnet

New member
Local time
Yesterday, 23:42
Joined
Mar 21, 2005
Messages
8
Sorry for posting something you all have thoroughly spoken about before but I am trying to pass

RetVal = Shell("C:\Program Files\Seagull\BarTender 6.20\Professional\bartend.exe /F=C:\barcode\IncomingBarcodedbsample.btw /P /C=Numoflabel", 1)

I want it to take the Numoflabel and put the number in like:
RetVal = Shell("C:\Program Files\Seagull\BarTender 6.20\Professional\bartend.exe /F=C:\barcode\IncomingBarcodedbsample.btw /P /C=5", 1)

so it can be interpreted correctly by the shell program.

I have read 5 or so threads talking about this but I can not get it to work.

When I do msgbox it always comes out correct and the variable was declared as a integer as well.

what am i missing?

Again my apologies for rehasing somethign you all have hashed before.
 
I might be looking at this wrong or misunderstanding your question, because the answer seems to simple. But it appears the problem is that you have your variable inside your string. It should read:

Code:
RetVal = Shell("C:\Program Files\Seagull\BarTender 6.20\Professional\bartend.exe /F=C:\barcode\IncomingBarcodedbsample.btw /P /C=" & Numoflabel, 1)
 
Solved

You are correct! It is something terribly easy, but i didn't see it. I appreciate your help.
 

Users who are viewing this thread

Back
Top Bottom