RE: Access Query with Password

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have some bad news for you: you can't use ADO to open a password-protected
Excel file:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;211378
However, there is a workaround: it is possible to use ADO if you first open
the workbook. So you could open it (hidden if necessary) in your code first
- see Method 2 in the reference above.

"Dominator" wrote:

>
> I have seen a few posts on how to use VBA in Excel to get information in
> a query. My problem is that I cannot find how to get it "save the
> password" so that a password popup does not appear.
>
> I am planning on using the "Sub sCopyRSExample()" that copies the
> information into an existing sheet as seen on this site:
> http://www.mvps.org/access/modules/mdl0035.htm
>
> Any help would be greatly appreciated.
>
>
> --
> Dominator
> ------------------------------------------------------------------------
> Dominator's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=18504
> View this thread: http://www.excelforum.com/showthread.php?threadid=376601
>
>
.



Relevant Pages

  • Read excel files with ado.
    ... I'm trying to open an excel file with ado. ... With a different script I found that ado cannot find the adox.catalog table object in the ... Set oConnection = createobject ...
    (microsoft.public.scripting.vbscript)
  • Using ADO.Net to Create and Alter an Excel File...
    ... Next I want to use DataReader to read the data from the "backup of..." ... So how do I build the string I need to create the blank excel file ... using only ADO? ... I cannot guarantee that excel is installed on the PC ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Controlling free Excel reader with VB or VBA?
    ... >> I'd import the Excel file into an Access database and write the user ... >> interface for that in VB. ... I'd use ADO, but anything will work. ...
    (microsoft.public.vb.general.discussion)
  • CREATE TABLE - Spreadsheet and name range?
    ... I'm trying to make an excel file with ADO in MFC. ... sql query and then insert rows into the table. ... noticed that CREATE TABLE will create a spreadsheet and a name range. ...
    (microsoft.public.data.ado)
  • Re: Controlling free Excel reader with VB or VBA?
    ... >> I'd import the Excel file into an Access database and write the user ... >> interface for that in VB. ... I'd use ADO, but anything will work. ...
    (microsoft.public.excel.programming)