Sage 100 button link - pass variable to vbscript for shell call

SUGGESTED

From Main Item Maint Panel

I added a button link to run a vbscript, which runs a shell command.

How can I pass the ItemCode to the vbscript.


' init vars

Dim itemcode
Dim oShell

itemcode = "S-209220"        'hardcoded here works, but needs to change based ion item selected in ItemMaint

itemcode = CI_ItemCode_bus_ItemCode$    'this blows, what are my options


Set oShell = CreateObject("WScript.Shell")
oShell.Run "\\192.168.40.39\Library\Scripts\apps\sage_console.exe" + " " + itemcode

Regards