View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Peter[_21_] Peter[_21_] is offline
external usenet poster
 
Posts: 35
Default Programmactic access to Visual Basic Project is not trusted

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