Thread: delete module
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mike allen[_2_] mike allen[_2_] is offline
external usenet poster
 
Posts: 85
Default delete module

I am having trouble deleting modules. I am used to this working, even
though it looks like I am deleting worksheets and not modules. It does not
work, however, on new program/computer, for some reason:
Sheets(Array("module2", "module3")).Delete

These 2 do not work either:
Modules(Array("module2", "module3")).Delete
WorkSheets(Array("module2", "module3")).Delete

I have tried Chip Pearson's routine, but couldn't get it to work, either.
"Programmatic access to Visual Basic Project is not trusted" is what I get.

Does anyone know of a way to simply delete modules? Thanks, Mike Allen