Copy and pasting sheets with merged cells

  • Thread starter Thread starter John Corbin
  • Start date Start date
J

John Corbin

Hi...

I am attempting some copy and pasting of cells in a large worksheet (
not sure if attachments are allowed here )

Basically on the settings' page I set the year using the slider feature and
the calender is created in the calender sheet and then copied to the
various months of the year.

The row height and column width have been checked and are identicle
across all the pages.

When I run the code I get an error ( RUN TIME ERROR 1004 ) which
basically says that this operation requires the cells be identically
sized. This line of the VB code is highlighted.

Worksheets(strPageName).Range("A5").PasteSpecial Paste:=xlPasteValues

I have checked all the cells and cannot see the problem.

Can anyone help ?
 
See my reply from your earlier post:

I have found that you can paste to the formulabar of a cell or merged cells.
If cells A1:C1 are merged and you want to paste the value from F1 to the
merged cells, this code works:

Range("A1").Formula = Range("F1").Value

This may be of some use to your needs,
Mike F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top