Copy and paste the worksheet to New workbook..

S

Sudarshan

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
Before:=Workbooks("Book2").Sheets(1)
' This is for remove the formulas.
ActiveSheet.UsedRange = ActiveSheet.UsedRange.Value


Sudarshan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top