View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Copy and paste the worksheet to New workbook..

Hi
take a look at
http://www.cpearson.com/excel/vbe.htm

to delete the code


--
Regards
Frank Kabel
Frankfurt, Germany


Sudarshan wrote:
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