Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default Removing a module using VBA

I'm pretty sure this can be done as I have been able to remove code from
ThisWorkbook.

How can I use VBA code to remove a module...say..."Module1".

Thanks in advanced.
Paul


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Removing a module using VBA

see:

http://www.cpearson.com/excel/vbe.htm


--
Gary''s Student
gsnu200705


"PCLIVE" wrote:

I'm pretty sure this can be done as I have been able to remove code from
ThisWorkbook.

How can I use VBA code to remove a module...say..."Module1".

Thanks in advanced.
Paul



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Removing a module using VBA

Sub RemoveModule()
With ActiveWorkbook.VBProject
.VBComponents.Remove .VBComponents("Module1")
End With
End Sub

Of course, this requires a reference to the MS VBA extensibility...


HTH,
Bernie
MS Excel MVP


"PCLIVE" wrote in message ...
I'm pretty sure this can be done as I have been able to remove code from ThisWorkbook.

How can I use VBA code to remove a module...say..."Module1".

Thanks in advanced.
Paul



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Removing a module using VBA

No of course about it, it doesn't.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Sub RemoveModule()
With ActiveWorkbook.VBProject
.VBComponents.Remove .VBComponents("Module1")
End With
End Sub

Of course, this requires a reference to the MS VBA extensibility...


HTH,
Bernie
MS Excel MVP


"PCLIVE" wrote in message
...
I'm pretty sure this can be done as I have been able to remove code from
ThisWorkbook.

How can I use VBA code to remove a module...say..."Module1".

Thanks in advanced.
Paul





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default Removing a module using VBA

Thanks.
I forgot to check Chip's site. Works great!


"Gary''s Student" wrote in message
...
see:

http://www.cpearson.com/excel/vbe.htm


--
Gary''s Student
gsnu200705


"PCLIVE" wrote:

I'm pretty sure this can be done as I have been able to remove code from
ThisWorkbook.

How can I use VBA code to remove a module...say..."Module1".

Thanks in advanced.
Paul





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
Removing a module Candyman Excel Programming 4 September 6th 06 04:39 PM
Removing Module Protection Programatically Adam Excel Discussion (Misc queries) 8 April 17th 06 05:46 AM
Removing & Importing a macro module Glen Mettler[_4_] Excel Programming 3 June 18th 05 09:32 PM
Removing a module with a macro bb Excel Programming 1 December 22nd 04 02:07 PM
Removing a module with code KimberlyC Excel Programming 2 January 13th 04 09:51 PM


All times are GMT +1. The time now is 05:56 AM.

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"