ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

删°£©Ò¦³¥N码

删°£©Ò¦³¥N码

¥»©«³Ì«á¥Ñ wqfzqgk ©ó 2010-8-23 09:19 ½s¿è

Sub 删°£()
Dim wbk As Workbook
Dim vbp As VBComponent
Set wbk = ActiveWorkbook
For Each vbp In wbk.VBProject.VBComponents
If vbp.Type = vbext_ct_Document Then
vbp.CodeModule.DeleteLines 1, vbp.CodeModule.CountOfLines
Else
wbk.VBProject.VBComponents.Remove vbc
End If
Next
学习

¦^´_ 1# wqfzqgk
³]©w¤Þ¥Î¶µ¥ØMicrosoft Visual Basic for Application Extensibility 5.0

¤u¨ã/¥¨¶°/¦w¥þ©Ê
¤Ä¿ï«H¥ô¦s¨úVisual Basic ±M®×
  1. Sub §R°£()
  2. Dim wbk As Workbook
  3. Dim vbp As VBComponent
  4. Set wbk = ActiveWorkbook
  5. For Each vbp In wbk.VBProject.VBComponents
  6. If vbp.Type = vbext_ct_Document Then
  7. vbp.CodeModule.DeleteLines 1, vbp.CodeModule.CountOfLines
  8. Else
  9. wbk.VBProject.VBComponents.Remove vbp
  10. End If
  11. Next
  12. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

³o¼Ë¤]¥i¥H§ä±o¨ì³á¡I¤p§Ì¨ØªA¡C
­É¿ú¤£ÁÙ¡A¤~¬O¤ý¹D

TOP

        ÀR«ä¦Û¦b : ª¾ÃÑ­n¥Î¤ßÅé·|¡A¤~¯àÅܦ¨¦Û¤vªº´¼¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD