View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default delete vbcode dynamically


be aware that that many users have DISABLED
"Trust Access to Visual Basic Project".

if not enabled then all reading/writing to VBProject will fail.
if enabled then:

With Workbooks("myTarget").VBProject. _
VBComponents("thisworkbook").CodeModule
.DeleteLines 1, .CountOfLines
End With


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


ilyaskazi wrote :


How to delete vbcode (coded in ThisWorkbook) of targetworkbook from
activeworkbook dynamically ??