View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sudarshan[_3_] Sudarshan[_3_] is offline
external usenet poster
 
Posts: 2
Default Copy and paste the worksheet to New workbook..

Hi,

I am able to copy and paste the worksheet to new worksheet
in new workbook. But i have one problem. The worksheet
which I am copying is having VBA Code behind it. When i do
copy paste , VBA code also copies to new workseet. I do
not want the VBA code to be copied..

Any solution...

My Existing Code

Workbooks("Book1").Sheets("Sheet1").Copy
Befo=Workbooks("Book2").Sheets(1)
' This is for remove the formulas.
ActiveSheet.UsedRange = ActiveSheet.UsedRange.Value


Sudarshan