Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
vesiletaskiran
Contributor III
Contributor III

Macro window pops up after reload

Hello All,

I have a simple macro running successfully since 1 year on postreload action. I am triggering reload with a batch file from windows task scheduler. Everything was working fine till last week. I made few changes on the pages during that time but i cannot find what went wrong causing this issue. What happens is reload complete with no error (I generated logfile also nothing there) and popup the macro edit window causing qlikview open on the background. 

Since no change on the macro, i suspect something wrong with variable,source files, expression on a page or on edit script. But how can i find that?

My early backups from last month also have the same behavior which is strange bcz everything was working fine till last week. By the way it worked correct only one of my 20 reload tries today.

Note: i cannot share the whole code bcz its a huge project with 320 MB of qvw and many qvds. 

sub HistoryCHTicketStock
set obj = ActiveDocument.GetSheetObject("CH_TicketStock_History")
set v = ActiveDocument.GetVariable("qvdPath")
obj.ExportEx v.GetContent.String&"\"&"HistoryCHTicketStock.txt",1,true

ActiveDocument.Save
Application.Quit
end sub

Thanks in advance

Labels (1)
2 Replies
rubenmarin

Hi, Maybe macro security has ben changed and this type of code needs permission to access system. Press CTRL-M and check both dropdows in bottom-left corner. Both should have system access.

You can also comment lines to check wich one is returning the error and try to debug it, also check:

- There is a chart wih id CH_TicketStock_History.

- qvdPath variable has the patth to the document.

- HistoryCHTicketStock.txt is not locked by other process and the credentials that executes the batch has permission to write the file.

Brett_Bleess
Former Employee
Former Employee

To Ruben's point, if something happened in the QV Settings.ini file to mess up the Module Checksums settings, that is about the only thing of which I can think that would fit decently on the macro side of it, Ruben's other points on file locks etc., are the only other of which I can think as well that would cause the hang condition.  Sometimes running OnPostReload along with a /r option etc., can be problematic too in that the /r option is trying to close down the process while the trigger is trying to run the macro...  OnPostReload is not really meant for 'batch' situations for this reason, so just wanted to toss that out too.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.