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

Using VBA to enter values into BO prompts

Status
Not open for further replies.

FunkMaster

Technical User
Aug 1, 2002
26
GB
hello , could anyone help me i am having an problem with the vba code i am writing in excel , i want to have an box where users make an default value then VB opens sevral reports and uses the default value in the prompts.

Help?

cheers
 
Before calling Doc.Refresh, asign variables:

Doc.Variables("Propmt 1").Value = DefVal1
Doc.Variables("Prompt 2").Value = DefVal2

Where "Propmt 1", "Propmt 2", etc. are the strings passed to @Variable or @Prompt.
 
Hi Again i have tried the above solution but now i get the error message-- "Object doesn't not support this property or method." This is the bit of script i have:-

Dim Buso As busobj.Application
Dim DP As busobj.DataProvider
Dim HT As busobj.Report
Dim HP 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"
DefVal1 = InputBox("start Date")
Buso.Documents.Open ("C:\Accruals\BOMO085_INV1.rep")Buso.ActiveDocument.Variables("1.Start Date").Value=DefVal1
Buso.ActiveDocument.Refresh

Is it me or am i being an bit stupid and cann't see the wood for the code?

Cheers to anyone

Funkmaster
 
I think i foundthe answer to the problem, by putting item in it has seemed to sort me problems out

Buso.ActiveDocument.Variables("1.Start Date").Value=DefVal1

thanks to anyone who is or was , or did look to see if they could help cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top