View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jstrater jstrater is offline
external usenet poster
 
Posts: 13
Default Unprotecting the VBProject

I'm trying to set the .CodeName property of a worksheet, and I do it this way

Dim wks as Workshee
Dim sCodeName as Strin

Thisworkbook.VBProject.VBComponents(wks.CodeName). Name = sCodeNam

This works, unless the VBProject is password protected. Now the code knows its own password, so to speak. It's declared in a module as a public constant. But the VBProject.Protection property appears to be read-only. I can't get this to work from inside VBA. Note: I'm doing this in Excel '97, I hope that's not my problem. There has to be a way to do this, doesn't there

James