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 ??