Consulting

Results 1 to 2 of 2

Thread: Copy/Move Worksheet

  1. #1
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location

    Copy/Move Worksheet

    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?
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    This should work.
    With Sheets("old")
        .Copy after:=Sheets(Sheets.Count)
        Sheets(Sheets.Count).UsedRange.Formula = .UsedRange.Formula
    End With

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •