View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Morrigu Morrigu is offline
external usenet poster
 
Posts: 1
Default Open en close a workbook with password

Hi,

I have a workbook with VBA code, that opens another workbook, collect
info from some cells and then closes the second workbook.

That works fine, but now i have a password for opening on the secon
workbook.

i can send this with my opening code, and then i don't get the passwor
input box. That's ok.
for example:
Workbooks.Open Filename:= "D:\test.xls", Password:="test"

But when the workbook is closed i always get the input box.

i can't find how i can send the password with the closing statement.

activeworkbook.close doesn't have a password property.
activeworkbook.saveas does, but then i get the question for overwrit
the workbook.

I don't want that eather.

I hope this is clear and someone has an answer or maybe a more easy wa
to do this.

greetz,
To

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