Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default Help: Error when opening a password protected workbook

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Help: Error when opening a password protected workbook

I'm hoping you have newworkbook.xls or something.

"sam" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Help: Error when opening a password protected workbook

You didn't include the extension (.xls, .xlsm, .xlsx, ...)



sam wrote:

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.


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Help: Error when opening a password protected workbook

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

2003 and 2007 testing.


Gord

On Mon, 26 Oct 2009 17:39:35 -0500, Dave Peterson
wrote:

You didn't include the extension (.xls, .xlsm, .xlsx, ...)



sam wrote:

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.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Help: Error when opening a password protected workbook

Maybe it was a different spelling error.

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

Gord Dibben wrote:

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

2003 and 2007 testing.

Gord

On Mon, 26 Oct 2009 17:39:35 -0500, Dave Peterson
wrote:

You didn't include the extension (.xls, .xlsm, .xlsx, ...)



sam wrote:

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.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vba code for opening password protected workbook Carl Irving Excel Programming 9 October 29th 07 10:01 PM
password protected page not opening by web query vive2567 Excel Worksheet Functions 0 January 13th 06 03:20 AM
Opening password protected files Nick S[_13_] Excel Programming 3 November 9th 05 04:38 PM
Excel password protected not opening up on just one PC. M. Lord Excel Discussion (Misc queries) 2 July 25th 05 04:01 PM
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. Daniel Excel Worksheet Functions 0 June 23rd 05 11:56 PM


All times are GMT +1. The time now is 01:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"