Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

qlikhalmar
Contributor

CMD reload via MS Access VBA

Hello all,

I want to reload a Qlikview document with a commandline via a MS Access macro.I made a simple macro like this:

Call Shell("cmd.exe C:\Program Files\QlikView\qv.exe /r C:\Users\HH01\Google Drive\Sjabloon\Workbooks\3. Datamodel\SourceListGenerator.qvw pause", vbNormalFocus)

The next thing i want is to change some variables in de qvw. The input for that variables are inside of a textfield in a Accessform.

For that I made a macro like this:

Call Shell("cmd.exe C:\Program Files\QlikView\qv.exe /r /vQVDmap=" & Forms![AP Qlikview Console]![Tekst59] & " /vQVDprefix=" & Forms![AP Qlikview Console]![Tekst73] & "C:\Users\HH01\Google Drive\Sjabloon\Workbooks\3. Datamodel\SourceListGenerator.qvw pause", vbNormalFocus)

But they are both not working.

can someone help me with this macro?

Thanks in advance,

Halmar

Tags (3)
1 Solution

Accepted Solutions
Not applicable

Re: CMD reload via MS Access VBA

It also works without cmd.exe:

Call Shell("C:\Program Files\Qlikview\qv.exe /r <Path to qvw>")

3 Replies
Not applicable

Re: CMD reload via MS Access VBA

Hi Halmar,

The Syntax in CMD should be:

"C:\Program Files\Qlikview\qv.exe" /r "<path to the qvw>"

This works, so it's just a quotation thing :-)

Not applicable

Re: CMD reload via MS Access VBA

It also works without cmd.exe:

Call Shell("C:\Program Files\Qlikview\qv.exe /r <Path to qvw>")

qlikhalmar
Contributor

Re: CMD reload via MS Access VBA

The complete working macro is:

Private Sub Knop81_Click()

    Dim Field1 As Object

    Dim Field2 As Object

   

    Set Field1 = Forms![AP Qlikview Console]![Tekst59]

    Set Field2 = Forms![AP Qlikview Console]![Tekst73]

   

    Call Shell("C:\Program Files\QlikView\qv.exe /r /vQVDmap=" & Field1 & " /vQVDprefix=" & Field2 & " C:\Users\HH01\Google Drive\Sjabloon\Workbooks\3. Datamodel\SourceListGenerator.qvw", vbNormalFocus)

End Sub