Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default delete module

You need at least to grant programmatic access to delete modules

ToolsMacroSecurity and on the Trusted Publishers tab, tick the Trust
access to Visual Basic project checkbox. Then follow the instructions on
Chip's site.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"mike allen" wrote in message
...
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to delete sheets and saves remaining file does not properly delete module pherrero Excel Programming 0 June 21st 05 05:16 PM
Macro to delete sheets and saves remaining file does not properly delete module pherrero Excel Programming 0 June 21st 05 05:11 PM
Macro to delete sheets and saves remaining file does not properly delete module bhawane Excel Programming 0 June 21st 05 04:54 PM
Macro to delete sheets and saves remaining file does not properly delete module bhawane Excel Programming 0 June 21st 05 04:53 PM
Macro to delete sheets and saves remaining file does not properly delete module bhawane Excel Programming 0 June 21st 05 04:53 PM


All times are GMT +1. The time now is 09:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"