View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Handle password for open workbook?

You can't have VBA code in the workbook enter the password; since
the workbook is not yet open, no VBA can be executed. The closest
you could get is to use another unprotected workbook to open the
target workbook, and supply the password in the Open method.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Marc" wrote in message
...
I would like to have password for opening workbook. This is
easy, but I
would like to use VBA to enter password when asked, so that I
don't need to
manualy type every time. In this way when opening workbook I
would have to
click on enable macro.
Is this possible or does exists some other way to solve this,
can someone
help?

Thanks very much!!!