View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
onedaywhen onedaywhen is offline
external usenet poster
 
Posts: 459
Default Hiding Named Ranges

I tried this approach but still couldn't get at password in the VBA
code e.g.

? ActiveWorkbook.VBProject.VBComponents(3).CodeModul e.Lines(1,5)

worked on an unprotected VBA project, but if I protected the VBA
project with a password I get a run-time error, 'Can't perform
operation since the project is protected.'

--

"arno" wrote in message ...
password in VBA code and [give] the VBA project a password".



the trick is, i can run lot's of code from workbook A accessing the
vba-protected workbook B directly from workbook __A__! I simply have to open
workbook B and the rest of the macro works with "activeworkbook.whatever".