View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_846_] Simon Lloyd[_846_] is offline
external usenet poster
 
Posts: 1
Default Expiration date on Macro


Hi in your Auto_Open sub type If Date = "YOUR DATE HERE" Then Call YOUR
SUB CONTAINING THE CODE BELOW, the code below is from Chip Pearsons site
there is a whole host of helpful things there take a look!
http://www.cpearson.com/excel.htm

Regards,
Simon

Deleting All VBA Code In A Project

The procedure below will delete all the VBA code in a project. You
should use this procedure with care, as it will permanently delete the
code. Standard modules, user forms, and class modules will be removed,
and code within the ThisWorkbook module and the sheet modules will be
deleted.

Sub DeleteAllVBA()
Dim VBComp As VBIDE.VBComponent
Dim VBComps As VBIDE.VBComponents

Set VBComps = ActiveWorkbook.VBProject.VBComponents

For Each VBComp In VBComps
Select Case VBComp.Type
Case vbext_ct_StdModule, vbext_ct_MSForm, _
vbext_ct_ClassModule
VBComps.Remove VBComp
Case Else
With VBComp.CodeModule
..DeleteLines 1, .CountOfLines
End With
End Select
Next VBComp

End Sub


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=566866