Shell command passing variable into (1 Viewer)

robertlewisnet

New member
Local time
Today, 05:59
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.
 

doulostheou

Registered User.
Local time
Today, 05:59
Joined
Feb 8, 2002
Messages
314
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)
 

robertlewisnet

New member
Local time
Today, 05:59
Joined
Mar 21, 2005
Messages
8
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

Top Bottom