Re: $$Excel-Macros$$ How to remove vb code after you make a copy

2014-06-28 Thread ashish koul
try this link http://www.ozgrid.com/VBA/delete-sheet-code.htm On Fri, Jun 27, 2014 at 3:03 AM, Rob Flott wrote: > My application allows the user to make a copy of a worksheet so it can be > viewed outside of the application. The problem I have with this is the > code written to that specific

Re: $$Excel-Macros$$ How to remove vb code after you make a copy

2014-06-27 Thread Paul Schreiner
Try adding this code:       With ActiveWorkbook.VBProject     For x = .VBComponents.Count To 1 Step -1     If (.VBComponents(x).Name = "Report") Then     .VBComponents(x).CodeModule.DeleteLines _     1, .VBComponents(x).CodeModule.CountOfLines     End If