Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy workbook to 2nd workbook paste is greyed out elmer Excel Worksheet Functions 2 January 28th 09 06:06 PM
Copy and Paste Chart as Picture into another workbook or worksheet SteveC Charts and Charting in Excel 1 February 15th 07 11:47 PM
copy and paste using code from workbook to workbook bigdaddy3 Excel Discussion (Misc queries) 2 September 14th 05 11:06 AM
I cannot paste from one workbook to another. Copy works, paste do. JimmyMc Excel Discussion (Misc queries) 1 June 10th 05 03:54 PM
Copy worksheet and paste it in New workbook, all data except Formulas Sudarshan Excel Programming 4 May 26th 04 06:51 PM


All times are GMT +1. The time now is 03:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"