Results 1 to 5 of 5
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Merged Cell Error Message (03)

    I am encountering an error message with the following line of code and do not know how to resolve it. The range I am trying to copy does contain merged cells.

    The line of code is:
    oCurWB.Sheets("Daily Report").Range("Page1").SpecialCells(xlCellTypeVis ible).Copy

    and the error message reads as:

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Merged Cell Error Message (03)

    It looks to me like you have merged cells

    Can you attach an example with sheet that has the problem so we can investigate?

    Steve

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Merged Cell Error Message (03)

    You have found one of the many problems with merged cells. The only solution that I know of is to not have merged cells. If the code can know what cells are merged, the code could unmerge them, do the operation, and then merge them again.
    Legare Coleman

  4. #4
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Merged Cell Error Message (03)

    Legare,

    That is what I had expected. I tweaked my code to unmerge the cells and etc.. I'm filing this one away with the other little quirks of Excel.

    Have a great weekend.
    John

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Merged Cell Error Message (03)

    I'm another member of the "I hate Merge Cells" camp. Have you expereinced how it messes up your ability to select columns? A lot of the problem arises from the "Center and Merge" toolbar icon installed in Excel since '97. See the last macro in <!post=this post,68,243>this post<!/post> which reverts to the old center-but-don't-merge behavior. Some times the old ways ARE best.
    -John ... I float in liquid gardens
    UTC -7ąDS

Posting Permissions

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