View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_1159_] Simon Lloyd[_1159_] is offline
external usenet poster
 
Posts: 1
Default dont open a Workbook is Password protected


Something like:

Code:
--------------------
If Err.Number = 70 Then GoTo Nxt
'Your code
Nxt:
--------------------


John;385733 Wrote:
Hi all,

How can i error trap opening a workbook from VB if the Workbook is
Password
protected? I'm using:

Workbooks.open WB, Updatelinks:=False, ReasOnly:=True
I'm thinking maybe i have to have an error handler somewhere but dont
know
what to write. Any help as always greatly appreciated.

Thanks.
John



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=107859