Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
james
Creator III
Creator III

Post Reload Macro Not Working?

All, I have 9.0 SR2 and I have a MACRO set to run on post reload, yet it doesn't work.

I am reloading it manually and it still brings up the edit module screen once it gets to the point where the Macro should fire..

Any thoughts?

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP


James wrote:
The Macro runs fine


I take it you mean the macro runs fine when executed using the Test button when the document is open.

I'm guessing you are trying to access something that is not available in the PostReload environment. For example, you cannot GetVariable() in PostReload. If you have further questions, please post the macro you are having trouble with and maybe we can suggest a workaround.

-Rob

View solution in original post

7 Replies
pkelly
Specialist
Specialist

If the edit module loads when you reload it normally points to a bug within your edit module script....

james
Creator III
Creator III
Author

The Macro runs fine

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP


James wrote:
The Macro runs fine


I take it you mean the macro runs fine when executed using the Test button when the document is open.

I'm guessing you are trying to access something that is not available in the PostReload environment. For example, you cannot GetVariable() in PostReload. If you have further questions, please post the macro you are having trouble with and maybe we can suggest a workaround.

-Rob

james
Creator III
Creator III
Author

Here is the MACRO in question :

sub ExcelExportDSR

set Chart = ActiveDocument.GetSheetObject( "CH100" )

"\\Sales\Test.xls",5

Set obj = ActiveDocument.GetSheetObject("CH600")

"\\Sales\Test.jpg")

end sub

This runs fine when I test is as mentioned and when you execute this via a button.

Any ideas would be greatly appreciated. The workaround I am using today is have a vbs file that opens the file and runs the app. Than after opens it again and on open trigger macro

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can't do this in PostReload. PostReload is "headless" -- there is no GUI so the sheet objects are not rendered.

I think the workaround you are using -- an external task -- is the way others are doing it.

-Rob

james
Creator III
Creator III
Author

Thanks Rob, good to know!

Not applicable

Hi Rob,

I have a simillar issue where I previously run post reload tasks that exported Excel files from object tables without any issues during the night when no-one was in.  I have since moved the task to QV 11 server and suddenly the object cannot be created.  Yet I do have the macro setting the same in the module.

Is this some functionality lost with 11 or am I missing something undemental here?