Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro hangs at Swith To box

Status
Not open for further replies.

binway

MIS
Nov 9, 2003
21
AU
Hi Team,
I am running a macro in 6.6 on my PC that opens two reports in the same session of powerplay.
the code is:
Code:
option explicit
sub main
dim objPPApp as object
dim objPPFilterReport as object
dim objPPChartReport as object
dim objFilterReportRow as object   
dim sDateFound as string   
dim sPath as string
on error goto mainError     
on error resume next                
   set objPPApp = GetObject(,"PowerPlay.Application")
   if objPPApp is nothing then
      set objPPApp = CreateObject("PowerPlay.Application")
   end if
   objPPApp.visible = true
   objPPApp.Maximize
on error goto mainError     
   sPath = "DIRECTORY PATH TO REPORTS"
   set objPPFilterReport = objPPApp.reports.open(sPath+"Find Date Time.ppr")
   objPPFilterReport.visible=true
   set objPPChartReport = objPPApp.reports.open(sPath+"Load Curve Data.ppr")
   objPPChartReport.visible=true
   objPPFilterReport.activate
mainCleanup:
   set objFilterReportRow = nothing
   set objPPFilterReport = nothing
   
   set objPPChartReport = nothing
   set objPPApp = nothing
   exit sub
   
mainError:
dim sMsg as string
   
   sMsg = "An error occured in the charting module. "
   sMsg = sMsg + "If you continue to have problems note the error number and error message below."
   sMsg = sMsg + " Error " + cstr(err()) + " " + error()
   msgbox sMsg
   goto mainCleanup:
end sub
[code/]

This macro is started by a button in portfolio.  It seems to open powerplay ok but hangs at this point.  If I switch back to Portfolio the Server Busy box will be displayed, if I click Swith To the reports will then open up.  If I execute the macro direct from the script editor the reports open without any problems.

Are there any solutions to this.

regards

binway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top