Can I add this to a Macro

  • Thread starter Thread starter Bob Vance
  • Start date Start date
B

Bob Vance

--
I have a macro that copies cells and pastes them somewhere else, can I add
to the macro "if past this date 6/6/2004 to delete all macros in this book
without confirmation"


Thanks in advance.........Bob Vance
 
Hi Bob

Try the examples on Chip's site
http://www.cpearson.com/excel/vbe.htm

You can use this if all your code is in one module for example

Sub Test()
If Date > DateSerial(2004, 6, 29) Then
With ThisWorkbook.VBProject.VBComponents
.Remove .Item("Module1")
End With
Else
MsgBox "place your code here"
End If
End Sub
 
Back
Top