Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add a border to pasted cells
I am trying to place a border around some cells I pasted using a macro.
My problem is that I don't know the location of the pasted cells because I am pasting to the next empty row below other data. See below: Set rng = Sheets("files").Cells(Rows.count, 2).End(xlUp)(2).Offset(2, 0) range("C3:D5").Copy rng.PasteSpecial xlFormats rng.PasteSpecial xlValues Is there a way I can place a border around the pasted cells with just the info from this code? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add a border to pasted cells
Nevermind, I got it. Just had to activate the sheet:
Sheets("files").Activate Selection.Borders(xlEdgeTop).LineStyle = xlDouble |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with matching pasted cells | Excel Programming | |||
Not all pasted text appears in cells | Excel Discussion (Misc queries) | |||
VBA: Pasted Cells Not Formatted | Excel Programming | |||
cell validation even for values pasted into cells | Excel Worksheet Functions | |||
how do I remove spaces from cells that were pasted | Excel Discussion (Misc queries) |