How to Copy Format without using Clipboard?

Ceeyee

Board Regular
Joined
Feb 2, 2011
Messages
164
I want to copy the Format of a large range to another cell location using VBA.

I don't want to use .Copy and .Pastespecial because it will interupt with my PC front end copy and paste operations.

I found some code from the internet which does what I want but it's extremely slow as it uses loops to run through each cell.


Is there any way to do it without using the clipboard and looping through each cell to = the format? I am using Excel 2010.

Thanks.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Upvote 0
No, that constant removes the clipboard content.

Kenneth,

If it is not much trouble, could you replace the XML_SPREADSHEET Const used in my initial code with each of the clipboard Formats Hex constants in the text file dump you posted and see if any of them works for keeping the clipboard contents (including the cell formats)

In theory, at least one of those contants should work.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

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