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: 
Not applicable

VBScript code to reload a document QlikView

Hi community.

Please can someone help me to write a VB script to relaod a qlikview document.

I want that when a user press on a button, the QlikView document is charging by running this code VBSCRIPT.

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Hi

write this in Macro editor

sub myreloadfunction

     ActiveDocument.Reload

end sub

this will reload the current document or Active Document or that document where it is written.

Regards,

Shubhu

View solution in original post

7 Replies
Not applicable
Author

Hello I am not sure for VB, but heres what you can use in the comman line or for a batch file and just do some research around this :

"C:\Program Files\QlikView\Qv.exe" /r "C:\Documents and Settings\User\Desktop\QvApps\MyConnection.qvw"

This above command works as a batch file and the /r takes care of opening and reloading the Qlikview file...

Hope this helps.

Mady

Not applicable
Author

Thks for ur response Mady.

But i want a vbscript.

thx.

Not applicable
Author

Hi

write this in Macro editor

sub myreloadfunction

     ActiveDocument.Reload

end sub

this will reload the current document or Active Document or that document where it is written.

Regards,

Shubhu

Not applicable
Author

Thx SHUBBU, it's OK

rbecher
MVP
MVP

In some situations the reload popup window shows no progression. Therefor we're using this way:

        set shell = CreateObject("WScript.Shell")

        shell.AppActivate ActiveDocument.GetApplication.GetProcessId

        shell.SendKeys "^r"

It is sending the hotkey Ctrl+R to the QV menu. You could also use this for other use cases (e.g. a save button).

- Ralf

Astrato.io Head of R&D
Not applicable
Author

I need to refresh a QV document every 5 minutes with new data since the last reload.  I don't want the user to have to click a button, I just want the latest data always available.  What would be the best way to this?

Not applicable
Author

Hi Jammie,
you go to Scheduled Tasks in MS Windows, fire up there every five minutes test.cmd this batch with an ending. cmd Example

Contents of the batch:
"C: \ Program Files \ QlikView \ QV.exe" / nosecurity / r "Q: \ real \ Departments \ IT \ test.qvw"

test is your QV

by Armin