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!

VBA Automation - Connecting to data source

Status
Not open for further replies.

MikeWillisUK

Programmer
Mar 22, 2010
1
GB
Hi all,

I've been working with VBA and automating applications for several years now, but I'm still fairly new to Business Objects and struggling to figure this out. Any help would be much appreciated.

MY QUESTION: Is it possible to provide a user ID and password when connecting to a datasource?

BACKGROUND: I have created a "control panel" in Excel where users in my office can simply select a Business Objects report, or a batch of reports, and then click a button to refresh the reports and save them as text files.

For the most part I have successfully managed to automate this process. It creates a new instance of BO, opens the docs, saves the docs, etc absolutely fine.

The only hiccup comes when I try to refresh the datasource. This is because the source we connect to requires user and pass authentication. A dialog box appears asking us to log in, and of course the automated process is halted until this is complete. It is a right pain because when running a batch of reports the users are repeatedly asked to log in! I was also hoping to be able to set the control panel on a timer so the batch of reports could be run in the morning before staff arrive at work - but all users will see when they arrive is a login box! :-(

I'd love it if there was something along the lines of:

bodoc.Refresh UserID:="MYUSER", Password:="MYPASS"

... but it doesnt appear to be that simple?

Any ideas?

Many thanks in advance,
Mike.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top