Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 492
Default Read Only File

Hi,
I want to open an XL file which is saved as read only as part of a macro,
(all above board, its my file). I know the code to open it but it still
gives the promt for the password. This is on a networked system, the file in
question is on a public drive.
Workbooks.Open Filename:="\\P:\Statistics$\Files\DA\BB29.xls"
Is there a way to incorporate the password within the code so it just opens
the file in the same way as unprotecting a worksheet like
Sheet2.Unprotect ("Password")
Something like
Workbooks.Open Filename:="\\P:\Statistics$\Files\DA\BB29.xls", Password:=
("Password")
That doesnt work, I've tried it!
Thanks for any advice,
Regards,
Alan.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 492
Default Read Only File

Sorry those two lines have turned into hyperlinks, I don't know why that
happened, it wasn't like that when I sent it, please ignore them,
Regards,
Alan.
"Alan" wrote in message
...
Hi,
I want to open an XL file which is saved as read only as part of a macro,
(all above board, its my file). I know the code to open it but it still
gives the promt for the password. This is on a networked system, the file
in question is on a public drive.
Workbooks.Open Filename:="\\P:\Statistics$\Files\DA\BB29.xls"
Is there a way to incorporate the password within the code so it just
opens the file in the same way as unprotecting a worksheet like
Sheet2.Unprotect ("Password")
Something like
Workbooks.Open Filename:="\\P:\Statistics$\Files\DA\BB29.xls", Password:=
("Password")
That doesnt work, I've tried it!
Thanks for any advice,
Regards,
Alan.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Read Only File

Workbooks.Open FileName:= fName, Password:= PW
--
Tim Williams
Palo Alto, CA


"Alan" wrote in message ...
Sorry those two lines have turned into hyperlinks, I don't know why that
happened, it wasn't like that when I sent it, please ignore them,
Regards,
Alan.
"Alan" wrote in message
...
Hi,
I want to open an XL file which is saved as read only as part of a macro,
(all above board, its my file). I know the code to open it but it still
gives the promt for the password. This is on a networked system, the file
in question is on a public drive.
Workbooks.Open Filename:="\\P:\Statistics$\Files\DA\BB29.xls"
Is there a way to incorporate the password within the code so it just
opens the file in the same way as unprotecting a worksheet like
Sheet2.Unprotect ("Password")
Something like
Workbooks.Open Filename:="\\P:\Statistics$\Files\DA\BB29.xls", Password:=
("Password")
That doesnt work, I've tried it!
Thanks for any advice,
Regards,
Alan.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 492
Default Read Only File

Sorry but I can't get that to work, its the same as in my post isn't it, or
am I missing something?
Regards,
Alan.
"Tim Williams" <timjwilliams at gmail dot com wrote in message
...
Workbooks.Open FileName:= fName, Password:= PW
--
Tim Williams
Palo Alto, CA


"Alan" wrote in message
...
Sorry those two lines have turned into hyperlinks, I don't know why that
happened, it wasn't like that when I sent it, please ignore them,
Regards,
Alan.
"Alan" wrote in message
...
Hi,
I want to open an XL file which is saved as read only as part of a
macro,
(all above board, its my file). I know the code to open it but it still
gives the promt for the password. This is on a networked system, the
file
in question is on a public drive.
Workbooks.Open Filename:="\\P:\Statistics$\Files\DA\BB29.xls"
Is there a way to incorporate the password within the code so it just
opens the file in the same way as unprotecting a worksheet like
Sheet2.Unprotect ("Password")
Something like
Workbooks.Open Filename:="\\P:\Statistics$\Files\DA\BB29.xls",
Password:=
("Password")
That doesnt work, I've tried it!
Thanks for any advice,
Regards,
Alan.







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Read Only File

Not *exactly* the same, which is why I posted it.
It's always worked for me.

Excel version etc?

Tim


"Alan" wrote in message ...
Sorry but I can't get that to work, its the same as in my post isn't it, or am I missing something?
Regards,
Alan.
"Tim Williams" <timjwilliams at gmail dot com wrote in message ...
Workbooks.Open FileName:= fName, Password:= PW
--
Tim Williams
Palo Alto, CA


"Alan" wrote in message ...
Sorry those two lines have turned into hyperlinks, I don't know why that
happened, it wasn't like that when I sent it, please ignore them,
Regards,
Alan.
"Alan" wrote in message
...
Hi,
I want to open an XL file which is saved as read only as part of a macro,
(all above board, its my file). I know the code to open it but it still
gives the promt for the password. This is on a networked system, the file
in question is on a public drive.
Workbooks.Open Filename:="\\P:\Statistics$\Files\DA\BB29.xls"
Is there a way to incorporate the password within the code so it just
opens the file in the same way as unprotecting a worksheet like
Sheet2.Unprotect ("Password")
Something like
Workbooks.Open Filename:="\\P:\Statistics$\Files\DA\BB29.xls", Password:=
("Password")
That doesnt work, I've tried it!
Thanks for any advice,
Regards,
Alan.











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
I have a read only xl file, I need it to be read and write drama queen Excel Discussion (Misc queries) 3 July 1st 06 12:25 AM
XCEL FILE REC'D AS READ ONLY -- HOW TO NOT BE "READ ONLY" billybob Excel Discussion (Misc queries) 1 February 13th 06 03:14 AM
Pasword protected Excel file encrypted, how do I read this file? jonesteam Excel Discussion (Misc queries) 2 December 12th 05 06:32 PM
How can a file be converted from Read-Only to Read/Write Jim in Apopka Excel Discussion (Misc queries) 2 November 19th 05 04:59 PM
"Unable to read file" error message when opening a Excel file that contains a PivotTable report. Tim Marsden Charts and Charting in Excel 2 October 15th 05 02:10 PM


All times are GMT +1. The time now is 04:03 PM.

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

About Us

"It's about Microsoft Excel"