Copy entire worksheet from another workbook's worksheet without range names too.

tfield98

New Member
Joined
Aug 30, 2011
Messages
35
I want to manually (or with VBA) copy the all of a worksheet's cell values between workbooks. The source & destination worksheets would have the same name.

I tried use the "Move or Copy" option on the right-click pop-up menu. But this moves all of the source workbook range names to the destination workbook.

I thought about using the clipboard, but I'm worried I might run out of clipboard space. (Excel 2010: is there a maximum number of rows/data allowed on the clipboard other than available RAM?)

Are there any clever ways to copy a worksheet to another workbook and either copy no range names, or only the source worksheet range names (but not source workbook range names)?

Thanks!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
This will copy the activesheet to a new workbook and remove all names.
Code:
Sub CopySheetSansNames()
Dim nm As Name
With ActiveSheet
    .Copy
End With
On Error Resume Next
For Each nm In ActiveWorkbook.Names
    nm.Delete
Next nm
End Sub
 
Upvote 0
You could copy the worksheet contents only eg:

Code:
With Activesheet.UsedRange
  .Copy
  Workbooks("Other Workbook.xlsx").Sheets("Some New Sheet").Range(.Cells(1,1).Address).PasteSpecial
End With
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top