Help: Error when opening a password protected workbook


S

sam

Hi All,

I am trying to pull some info from a password protected workbook to populate
some fields in my userform which is in a seperate workbook but it gives me an
error:
"C:\Documents\NewWorkbook" cannot be found. Check your spelling, or try a
different path

Here is my code to access the workbook:
Workbooks.Open "C:\Documents\NewWorkbook", False, False, , "password12"

Am i missing something here?

Thanks in Advance.
 
Ad

Advertisements

G

Gord Dibben

I tested and found NewWorkbook will open without the extension included
in the code.

2003 and 2007 testing.


Gord
 
Ad

Advertisements

D

Dave Peterson

Maybe it was a different spelling error.

In WinXP, it's "C:\my documents" (vista uses C:\documents, IIRC).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top