Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Bonni Garcia   on Aug 27 In MS Office Category.

  
Question Answered By: Calandre Bernard   on Aug 27

Prior to getting EXCEL 2003, this is the macro I used to have to run (from
another workbook) to remove all traces of a macro:

Sub RemoveMacros()
Dim O As Object
For Each O In ActiveWorkbook.Sheets
If TypeName(O) = "Worksheet" Then
Select Case O.Type
Case xlExcel4MacroSheet, xlExcel4IntlMacroSheet
Application.DisplayAlerts = False
O.Delete
Application.DisplayAlerts = True
End Select
End If
Next
With ActiveWorkbook.VBProject
For Each O In .VBComponents
Select Case O.Type
Case 1, 2 ' standard or class module
.VBComponents.Remove O
Case Else ' form or document
With O.CodeModule
.DeleteLines 1, .CountOfLines
End With
End Select
Next
End With
End Sub

I've never needed to use it for EXCEL 2003, so I'm not sure if it would
still work for it or not...

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Security Warning Incorrectly Claims Macros Are Present Or get search suggestion and latest updates.


Tagged: