View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Donald[_4_] Donald[_4_] is offline
external usenet poster
 
Posts: 11
Default Include password in VBA code to open file problem

Your code worked for me, I'm running Excel ver 10.0 (OfficeXP).

Most Microsoft software is case sensitive when entering a password. Check
the way you've entered the password in your code.

--
Donald
"PaulC" wrote in message
...

Hi

I have a workbook that is initially opened by the user with a modifying
password. Then when a macro is run I want to be able to close and then
re-open this workbook without having to input the password again.

I have tried:

Workbooks.Open Filename:="D:name.xls", Password:="My_Password"

but I am still asked to enter the password.

How do I do this?

Paul


--
PaulC
------------------------------------------------------------------------
PaulC's Profile:
http://www.excelforum.com/member.php...fo&userid=7563
View this thread: http://www.excelforum.com/showthread...hreadid=274042