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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with VBA Automation in Excel

Status
Not open for further replies.

Nitibob

MIS
Aug 19, 2002
32
0
0
GB
Hi all

Got a perplexing problem which I'm sure some of you can shed some light on


Developing a piece of code to open and run reports and had got part way throught when i decided to test it...the code so far:

Code:
Sub RunReport()

Dim buso As busobj.Application
Dim DP As busobj.DataProvider
Dim RT As busobj.Report
Dim DM As busobj.Document
Dim I As Integer
Application.Interactive = False
Application.DisplayAlerts = False
Set buso = CreateObject("BusinessObjects.Application")
buso.Interactive = True
buso.Visible = True
AppActivate "BusinessObjects"
buso.Documents.Open ("C:\Program Files\Business Objects\BusinessObjects 5.0\UserDocs\flood info.rep")
buso.ActiveDocument.Refresh
buso.ActiveDocument.Save
buso.ActiveDocument.Close



End Sub

This works fine - opens the report, refreshes and closes it. BUT when i have run this again, to double check - the second run causes a second BO session to open (without user or pswd prompts) and states that the document is not avaible. The code seems to give focus to this 'phantom' second session.

If I close my first session of BO and open it again, it works again :/

Any ideas?

I'm using excel 97 with BO ver 5.1.2

Cheers

Niti
 
Hi All:
I created a bar chart and i want dispaly an average as a straight secondary line on a chart dynamically..

i created a variable and wrote a formula for average,but not
getting out put..

i am using Oracle 9 and BO 5.1.7...

Thanks!
Praveen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top