Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Referencing password protected Workbook

I have workbook A and Workbook B, both of which have a password on th
workbook and on read-only password...

While running A, I need to call a sub within B, without B being open..
THe problem has been that no matter what I try, B opens up, and ask
for the password... Is there anyway to reference the method in
without B opening up, given that B is password protected?

Thanks,
Vigg

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Referencing password protected Workbook

"Viggy " wrote in message
...
I have workbook A and Workbook B, both of which have a password on the
workbook and on read-only password...

While running A, I need to call a sub within B, without B being open...


Hi Viggy,

Unfortunately, there is no way to do this. You must open a workbook in
order to call any code that it contains.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Referencing password protected Workbook

Hi
for referencing a method you HAVE to open the other workbook. One way
would be to use
workbooks.open
together with the password of this file

--
Regards
Frank Kabel
Frankfurt, Germany

"Viggy " schrieb im Newsbeitrag
...
I have workbook A and Workbook B, both of which have a password on

the
workbook and on read-only password...

While running A, I need to call a sub within B, without B being

open...
THe problem has been that no matter what I try, B opens up, and asks
for the password... Is there anyway to reference the method in B
without B opening up, given that B is password protected?

Thanks,
Viggy


---
Message posted from http://www.ExcelForum.com/


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Referencing password protected Workbook

Whats the syntax for opening the file with the password?

(i'm assuming something along the lines of :
Open.file password:= "stuff")

Also, is there a way to open the file, such that the user can't se
that its open

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Referencing password protected Workbook

Hi
just look at the Excel VBA help :-)

e.g.
Sub foo()
Application.ScreenUpdating = False
Workbooks.Open Filename:="D:\temp\test.xls",
WriteResPassword:="your_password"
Application.ScreenUpdating = True
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

"Viggy " schrieb im Newsbeitrag
...
Whats the syntax for opening the file with the password?

(i'm assuming something along the lines of :
Open.file password:= "stuff")

Also, is there a way to open the file, such that the user can't see
that its open?


---
Message posted from http://www.ExcelForum.com/




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Referencing password protected Workbook

Whats the syntax for opening the file with the password?

Workbooks("MyBook.xls").Open password:="MyPassword"

Also, is there a way to open the file, such that the user can't see
that its open?


The easiest way is to save it as a hidden workbook. Choose Window/Hide
from the Excel menu and save it that way from the Visual Basic Editor.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Viggy " wrote in message
...


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
Password protected workbook Moin Excel Discussion (Misc queries) 2 April 2nd 09 09:53 PM
Referencing a password protected excel file Sungibungi Setting up and Configuration of Excel 0 July 29th 08 10:51 PM
Multiple workbook user's with Master workbook - all password protected Yvon Excel Discussion (Misc queries) 2 March 30th 05 01:34 PM
Open a password protected excel workbook from second workbook to fetch data using dynamic connection kaustav choudhury Excel Programming 2 April 3rd 04 06:18 AM
Referencing password protected worksheets jh Excel Programming 0 January 16th 04 12:31 AM


All times are GMT +1. The time now is 02:44 AM.

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"