Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Does anyone have a clue?
Thanks!
The macro code would help.
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!
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...
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!
Have you checked the server-settings within the qmc in tab security "Allow (unsafe) macro ..."?
- Marcus
Have you tried:
sub exportTest
dim lb
set lb = ActiveDocument.GetSheetObject("LB86")
lb.SelectPossible
MsgBox "Before clear")
lb.clear
MsgBox "After clear")
end sub
Hi,
I have removed the lb.clear altogether, and the issue was resolved...for the time being..
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...
Thanks.. good to know about such option!