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