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: 
qlikhalmar
Creator
Creator

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

1 Solution

Accepted Solutions
Not applicable

It also works without cmd.exe:

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

View solution in original post

3 Replies
Not applicable

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

It also works without cmd.exe:

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

qlikhalmar
Creator
Creator
Author

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