PDA

View Full Version : [SOLVED:] Copy/Move Worksheet



MWE
08-23-2008, 04:49 PM
If one manually copies or moves a worksheet (edit | Move or Copy Sheet | ...) and any cell in the source worksheet contains more than 255 characters, only the first 255 characters for any such cell are copied to the new location. When this happens I normally just select the entire source worksheet and copy/paste it to the new location.

A similar phenomena occurs in VBA and I tend to "fix it" the same thing programatically. Is there a simpler (more elegant?) way to do this?

mikerickson
08-23-2008, 05:48 PM
This should work.

With Sheets("old")
.Copy after:=Sheets(Sheets.Count)
Sheets(Sheets.Count).UsedRange.Formula = .UsedRange.Formula
End With