Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Macro script not working


Hi,

Can someone help me with the below script that is not working and I cannot figure out why??

The first message box came out but after that nothing more happens.

Sub UpdateCRCOutletCode

    Dim myDIS_DistributorCode, myDIS_OutletCode, myCRC_Outlet_ID
    Dim tmpKey
    Dim objCellFound
   
    myDIS_DistributorCode = ActiveDocument.Variables("vSelectedDistributorCode").GetContent().String
    myDIS_OutletCode = ActiveDocument.Variables("vSelectedOutletID").GetContent().String
    myCRC_Outlet_ID = ActiveDocument.Variables("vSelectedCRCOutletID").GetContent().String

    MsgBox(myDIS_DistributorCode)

   Dim objShell

   Set objShell = Wscript.CreateObject("WScript.Shell")

    strVBS = "C:\Users\kohN01\Documents\CIS\TWN\CRC Replacement\Conceptual Solution Testing\Test.vbs"
    objShell.Run strVBS & " " & myDIS_DistributorCode & " " & myDIS_OutletCode & " " & myCRC_Outlet_ID

    Set objShell = Nothing

End sub

Please help. Thx.

rgds,
Nickson

0 Replies