View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JJI JJI is offline
external usenet poster
 
Posts: 1
Default Visual Basic Editor opens automatically after lock, unlock

(ms excel 2003) If I have a particular workbook open which contains macros
and If I happen to walk away and the computer locks... upon unlock the vba
editor pops up automatically. This particular workbook didnt do this until I
added some lines of code that unprotected one of the sheets so the macro
could write to it and once it was finished it protected the sheet again.

Activesheet.Unprotect ("My_Password")
Activesheet.Protect Password:="My_Password"