472,139 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,139 software developers and data experts.

Merged Cells - Paste


I have written some code to create a copy workbook of another sheet in a workbook, but the outcome is that the copy has links (='[Original.xls]Sheet1'!A5) for example instead of the values contained within the original workbook.

Also there are merged cells which seem to make my macro fall over - Runtime error '1004': This operation requires merged cells to be identically sized.

I don't understand this as the copy is an exact copy in sizes etc other than the values in the cells!

Is there a way of either making the original process of creating a copy sheet incorporate the column widths and heights with the values pasted or is it a two step process of creating a copy and then pasting in the values seperately.

Please help - this is driving me insane!

Many thanks

May 16 '07 #1
1 1847
807 Expert 512MB
Can you just use:
Sheets(1).Copy Before:=Sheets(2)
May 17 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by marfi95 | last post: by
1 post views Thread by Jean-François Michaud | last post: by
1 post views Thread by riwar | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.