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:
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... !
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... !