As far as importing data from a protected Excel worksheet goes, I'd suggest
you just try it.
I had no trouble in Access 2000 when I tried.
No password is required, just as none is required when you open a
password-protected Excel sheet just to read it.
Now as to setting a password programmatically, this is not available under
OutputTo. You can think of OutputTo as a wizard, which does a number of
steps for you, but won't do things that aren't in its steps.
The more flexible (and more complex) method is to use Automation to open
the spreadsheet you have just created and set a password for it. Automation
is a bigger subject than will fit well in a newsgroup post, but I'm sure you
can find information on it in any intermediate to advanced Access text, and
probably in a number of other places as well.
Post back if you run into specific questions.
- Turtle
(with all due respect to Pieter, who has many very useful posts here, I
don't think the URL he suggested has much relevance to your issues.)
"MissiMaths" <mi********@hotmail.com> wrote in message
news:75**************************@posting.google.c om...
I have used outputTo to export a copy of a table out of access into
excel. I was wondering if there is anyway to set a password on this
within the code so that it is read only in .xls format?
I was also hoping that there might be a away of importing a password
protected excel file into a table in access where the password is
known. I have searched help and can't see anything and also I couldn't
find the answer here as yet. I hope someone can help.
Thanks in advance.