View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Programmactic access to Visual Basic Project is not trusted

Hi Peter

John have a example on his site to avoid the error
http://www.j-walk.com/ss/excel/tips/tip96.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Peter" wrote in message ...
Hello everyone,

Because of this piece fo code:
...
Dim ModuleCount as Long (?)

ModuleCount = ThisWorkbook.VBProject.VBComponents.Count
Sheets.Add After:=Sheets(ModuleCount)

I get this error message:
"Programmactic access to Visual Basic Project is not trusted"

(What good is it then?)

Does anyone know how to circumvent this?


TIA

Peter