If you manually copy a worksheet and receive this error message, follow
these steps to make the new worksheet identical to the original worksheet:
- In the error message dialog box, click OK.
- Switch to the original worksheet.
- Press CTRL+A or click the Select All button in the upper-left
corner of the worksheet.
- On the Edit menu, click Copy.
- Activate the new worksheet and select cell A1.
- On the Edit menu, click Paste.
The new worksheet should now be identical to the original worksheet.
If cells in your worksheet are truncated when you use a Microsoft Visual
Basic for Applications macro to copy a worksheet, you can modify the macro
so that it copies the sheet successfully. The following sample subroutine
demonstrates how you can do this.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Sub Test()
'Turn off screen updating while the macro runs.
Application.ScreenUpdating = False
'xSheet is the sheet we want to copy.
Set xSheet = ActiveSheet
'Copy the worksheet to the destination you want. Cells with more
'than 255 characters will be truncated by this step.
xSheet.Copy Before:=Sheets(xSheet.Index)
'ySheet is the new worksheet.
Set ySheet = ActiveSheet
'Copy all of the cells on the original worksheet...
xSheet.Range("A:IV").Copy
'...activate the new worksheet...
ySheet.Range("A1").Select
'...and paste the copied cells. All cells in the new worksheet
'now have the correct contents.
ySheet.Paste
'Clear out the clipboard and select cell A1.
Application.CutCopyMode = False
Range("A1").Select
End Sub