View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_83_] Leith Ross[_83_] is offline
external usenet poster
 
Posts: 1
Default Password prtecting worksheets in code


Hello Cherman,

You maybe experiencing a timing problem. Code execution and othe
operations are not always synchronous. The For Each may be the proble
here. This method of looping is much faster than the old trusty Fo
Next loop. You maybe loop faster than VBA can unprotect the shee
causing the anomolies. Try inserting a delay in your loop or recode i
with a For Next loop

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=47838