View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Julian Milano[_2_] Julian Milano[_2_] is offline
external usenet poster
 
Posts: 19
Default Problem occurs when upgrading Excel from 97 to 2002

This one got me too in the beginning. Tools, Macro, Security, Trusted
Sources, Trust Access to Visual Basic Project!

--

Julian Milano


"YATES" wrote in message
...
When I was upgrading our program from Excel 97 to Excel
2002, the code that worked well with Excel 97, now fails
in Excel 2002. Please see the following line of failure.

Set theCode = ThisWorkbook.VBProject.VBComponents
("thisworkbook").CodeModule

When debugging, I found the following error message.

Run-time error 1004, Programmatic access to Visual Basic
Project is not trusted.

Does anyone have any suggestion? Thanks in advance!