Team!,
Hi! Currently, I have a database schema where I am hitting approximately 10 different tables. Using the OpenDatabase method, I am able to successfully query the information via Microsoft Query and return the results via VBA.
The current issue I have at hand is the manual password entry. For example, when Excel executes this line of code:
Set Open_DB1 = Workbooks.OpenDatabase(filename:="C:\" & numstuds_compliant)
, a window loads up specifying me to log in using my Username and Password. What I essentially want to accomplish is the ability to automate the entry of my username and password in the password-protected schema.
Alternatively, I tried using this command from the help of links from Google:
Set Open_DB = Workbooks.OpenDatabase(filename:="C:\" & numstuds, ReadOnly:=True, Connect:=";PWD=testingabc")
and when I attempt to run my vba script, I receive a compile error "Named Argument not found ReadOnly:=
I then tried removing the ReadOnly:=True and I then receive the same compile error, but this time, highlighting the Connect:= issue.
Is this because I am using an Oracle Database (Microsoft ODBC for Oracle)? The whole point of my Executive Report generation for Senior management is so that when the open up the workbook, all they need to do is click "Run" and the results/charts/graphs are displayed to them without the intervention of any manual password entry.
As this project is critical in its life cycle, any help and/or suggestions will be greatly appreciated.
Bookmarks