Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dafnis14
Specialist
Specialist

Macro parse failed error massage

Hi,

After upgrading to ver. 11.2, SR9, clients are getting an error message when trying to execute a macro which triggers another macro in an excel sheet.

  Running the macro from a desktop works fine, on the server as well as on a desktop.

MacroErr.PNG

Does anyone have a clue?

Thanks!

9 Replies
jerrysvensson
Partner - Specialist II
Partner - Specialist II

The macro code would help.

dafnis14
Specialist
Specialist
Author

Hi Jerry,

Here it is:

sub exportTest

set v=ActiveDocument.GetVariable("vReturnFilesPath")

a=v.getcontent.string

set lb = ActiveDocument.GetSheetObject("LB86")

lb.SelectPossible

set cs = ActiveDocument.GetSheetObject("ReturnTemp")

cs.ExportEx a & "ReturnTemp.xls" , 5

lb.clear

It works fine with a desktop, on the server or on a client.

Thanks!

Anonymous
Not applicable

so where is the problem if not on the server or desktop...??

also - my guess is that it fails at the exportex point.....test if this is true by putting a msgbox just before that line...

dafnis14
Specialist
Specialist
Author

Hi,

As I said, the error occures only when a user opens the application in server (i.e., client mode).

The tip about the msgbox was helpful..

The error is caused by the line : lb.clear.


Can you figure why it happens only in the client mode?


Thanks!



marcus_sommer

Have you checked the server-settings within the qmc in tab security "Allow (unsafe) macro ..."?

- Marcus

jerrysvensson
Partner - Specialist II
Partner - Specialist II

Have you  tried:

sub exportTest

     dim lb

     set lb = ActiveDocument.GetSheetObject("LB86")

     lb.SelectPossible

     MsgBox "Before clear")

     lb.clear

     MsgBox "After clear")

end sub

dafnis14
Specialist
Specialist
Author

Hi,

I have removed the lb.clear altogether, and the issue was resolved...for the time being..

Anonymous
Not applicable

assuming all other contingencies are satisfied (i.e. server settings, security settings, etc.)...

try putting this just before the "lb.clear" statement

activedocument.getapplication.waitforidle

I couldn't reproduce the error you're getting on my server in a test app so if the above doesn't work...my only guess would be that its related to something environment specific with the user...

dafnis14
Specialist
Specialist
Author

Thanks.. good to know about such option!