View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Programmactic access to Visual Basic Project is not trusted

Hi
goto 'Tools - Macros - Security' and on the second tab of this dialog
allow access to the VBA project

--
Regards
Frank Kabel
Frankfurt, Germany

"Peter" schrieb im Newsbeitrag
...
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