Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trapping error when pasting to merged cells

Status
Not open for further replies.

tbarthen

Technical User
Jul 26, 2003
33
US
I have an Excel worksheet which contains merged cells that users can paste various data into. I know that the user can press the F2 function key before pasting, or just click in the formula bar first - but the users don't always know that, and as a result, the following error happens:

"Data on the clipboard is not the same size and shape as the selected area. Do you want to paste the data anyway."

Does anyone know if there's is a way of trapping the error or trapping the paste function so that I can ensure the paste is successful? Also, if there is an option, would it belong in the Workbook_Open module, or some place else?
 
Not a solution to your problem I'm afraid, but the short answer is 'don't use merged cells'. You are always going to hit problems like this. I just replied in another thread to the same effect where someone is seeing formula calculations going screwy because of merged cells. If you can keep away from them, perhaps by using Format cells / Alignment / horizontal / 'centre across selection' instead, then you will be in much better shape.

I just don't know anyone in any of the Excel groups/forums that is of a different opinion wrt these damned things. All they ever do is cause heartburn.

Regards
Ken.....................


----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Well, alright then. I guess I won't waste my time with that problem. Thanks for saving me the time and trouble.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top