Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to perform "Close This Document" and "Open QlikView Document" at the same time with single click on the button. Condition is "Close This Document" should be executed first and then the "Open QlikView Document" which has be to executed next.
I am able to perform "Close This Document"on click of a button but not been able to perform "Open QlikView Document" on click of the same button.
Hope some one can help me out!
Same thing i have here also
The following macro might do the trick:
sub closeAndOpen
set App = ActiveDocument.GetApplication
ActiveDocument.CloseDoc
App.OpenDoc "myApp.qvw"
end sub
Hope it helps
/Fredrik
Hi Fredrik!
Thanks for your reply! Using you idea i can only close the application. I am not able to reopen as soon as it it closes the document. Let me know whether it worked or not.
After using it one of my document i am not able to open that document anymore :-). Infact i didn't the back up of that. Let me know is there is any way to revert back the changes. As my last copy is not available with me. Dont know the reason why there is no way to revert back the changes if something is wrong.
Also i dont have any idea why the automatic save(version) did not work.
Please help me out!
Hi All!
Will be thankful if some one can give solution for this problem.
I tried running the macro and it appears that it doesn't work if you run the macro inside of QV.
It works if you open another document but that wasn't what you we're looking for.
If you save this macro as xxx.vbs and run it when you click the button it works better:
set Qv = CreateObject("QlikTech.QlikView")
set ActiveDoc = Qv.ActiveDocument
ActiveDoc.CloseDoc
Qv.OpenDoc "myApp.qvw"
Why you can't open you document anymore, I can't really say. I haven't experienced any problems like that, sorry.
regards
/Fredrik
You have an issue in your vbs at the line 4.
It seems that you opened a string using " and didn't close it (unterminated string constant).
you can debug your vbs line by line by running Cscript.exe /X Myvbsfile.vbs
Rgds,
Sébastien
Hi Sébastien!
Hi I don't know what changes you are telling. Can you do the required changes and send it to me please.By the way i couldn't understand what is this Cscript.exe /X Myvbsfile.vbs. Do i need execute this in the run?
Hi All,
Can anyone help me out to solve this issue please!