Why is this pasting as an image between workbooks? It's TEXT!

ClimoC

Well-known Member
Joined
Aug 21, 2009
Messages
584
Hello again,

I can't stop this from happening. All I'm doing is declaring a range, then copying the range and using xlpasteall into another workbook, and it keeps pasting the cells as an image.

I've now just tried doing it Cell by Cell in the following loop:

Code:
                    SRange = SBook.Sheets("By Type").Range("A1:A" & SBook.Sheets("By Type").Range("A65000").End(xlUp).Row).Find(what:=ConsolC, _
                                        LookIn:=xlValues, lookat:=xlWhole).Address
                    If OutPut.Sheets("By Type").Range("A65000").End(xlUp).Row > 1 Then
                        DRange = OutPut.Sheets("By Type").Range("A65000").End(xlUp).Offset(9, 0).Address
                    Else
                        DRange = OutPut.Sheets("By Type").Range("A65000").End(xlUp).Offset(1, 0).Address
                    End If
                    For xDx = 0 To 10 Step 1
                        For yDy = 0 To 8 Step 1
                            SBook.Sheets("By Type").Range(SRange).Offset(yDy, xDx).Copy
                            OutPut.Sheets("By Type").Range(DRange).Offset(yDy, xDx).PasteSpecial xlPasteAll
                            Application.CutCopyMode = False
                        Next yDy
                    Next xDx

This keeps pasting as images. Which is clearly not what I want.

It has to be 'Paste Everything' rather than 'Values and Number Formats' (which incidentally, DOES work, but doesn't bring across the Test formatting I need - because there are multiple text colours within each cell.

Another thing to note, is that when the code between the SHEETS in the same book gets a dose of copy/xlpasteallexceptborders, the different text colours DO come through. But the problem is getting them between workbooks.

Can ANYONE help on this? Or can help me make sure that the data goes to the clipboard as it is in the source sheet?

As a test for anyone thinking this is straight forward - Write in a cell in one workbook some text, 1 or 2 carriage returns in it too, and then colour one line of text in that cell red, the second blue. Now try and make a cell in another workbook look exactly like that... !
 
Ta-daa!! It works. Thanks for helping me nut that one out guys... I still think it's a lacking that it either doesn't recognise the two objects are the same so therefore doesn't convert the data, or at least gives me the parameter to be absolutely sure of what I'm doing.

Still...

it works!
 
Upvote 0

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Forum statistics

Threads
1,214,827
Messages
6,121,823
Members
449,049
Latest member
cybersurfer5000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top