Sage 100

 View Only
  • 1.  v2014 Premium.. Need help with a Visual Basic prog

    Posted 07-23-2015 09:33
    v2014 Premium.. Need help with a Visual Basic program. Took over this account a year ago and now upgrading from v3.74 SQL to 2014 Premium. They have a button added using custom office on the inventory maintenance screen. When the button is clicked a VB program executes. There are 5 parameters that need to be passed to the program: PassedCompany = arguments(1), PassedUser = arguments(2), PassedModule = arguments(3), PassedDate = arguments(4), PassedItemNo = arguments(5). DO we have a VB programmer in the group or can someone in the group direct me to one. I need to know the syntax necessary to call these parameters when the program executes from item maintenance. Thanks!


  • 2.  RE: v2014 Premium.. Need help with a Visual Basic prog

    Posted 07-23-2015 09:59
    Is the program compiled (ie - something.exe) or is a VB Script - .vbs?


  • 3.  RE: v2014 Premium.. Need help with a Visual Basic prog

    Posted 07-23-2015 10:09
    It is a complied .exe program.


  • 4.  RE: v2014 Premium.. Need help with a Visual Basic prog

    Posted 07-23-2015 10:20
    Is anything returning to MAS from the VB program? If not, I would probably create a middle-man VBScript that calls the VB program. Pass the MAS system variables to generate your Run statement: MAS_SCR_CMP = Company Code, MAS_SCR_USR = User Code, MAS_SCR_MOD = Module Code, MAS_SCR_DTE = current module date and CI_ItemCode_bus_ItemCode for the Item code.


  • 5.  RE: v2014 Premium.. Need help with a Visual Basic prog

    Posted 07-23-2015 10:21
    Maybe something like this: Set objShell = WScript.CreateObject(""WScript.Shell"") strVB = ""Path to VB exe"" & "" "" & MAS_SCR_CMP & "" "" & MAS_SCR_USR & "" "" & MAS_SCR_MOD & "" "" & MAS_SCR_DTE & "" "" & CI_ItemCode_bus_ItemCode objShell.Run strVB, 1, True Set objShell = Nothing http://ss64.com/vb/run.html


  • 6.  RE: v2014 Premium.. Need help with a Visual Basic prog

    Posted 07-23-2015 10:23
    Thank you Steve. and Randy. No data returned now unless the parameters are manually populated.


  • 7.  RE: v2014 Premium.. Need help with a Visual Basic prog

    Posted 07-23-2015 11:34
    Not sure what the program is doing with the data, but I do know that we were very limited in our ability to do things back in the 3.7 days... might be worthwhile looking into doing this in VB script. You probably already have.


  • 8.  RE: v2014 Premium.. Need help with a Visual Basic prog

    Posted 07-24-2015 19:58
    Update. This is now working perfect. Created the vb script @SteveIwanowski gave me. After a couple of runs i got it to work. I really appreciate the help Steve. You were damn close off the top of your head. The first run it was throwing an OLE error 424. I changed the first line of code to Set objShell = CreateObject(""WScript.Shell""). The Error went away but the variables still weren't passing. I then changed CI_ItemCode_bus_ItemCode to CI_ItemCode_bus_ItemCode$ and it worked beautifully.


  • 9.  RE: v2014 Premium.. Need help with a Visual Basic prog

    Posted 07-27-2015 06:05
    You're welcome, Doug!