Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with matching pasted cells Aonghus Excel Programming 3 November 25th 05 02:29 PM
Not all pasted text appears in cells cjswift Excel Discussion (Misc queries) 1 August 8th 05 03:43 PM
VBA: Pasted Cells Not Formatted ajocius[_3_] Excel Programming 1 July 23rd 05 05:55 PM
cell validation even for values pasted into cells JR_06062005 Excel Worksheet Functions 2 July 13th 05 05:36 PM
how do I remove spaces from cells that were pasted GolfKing Excel Discussion (Misc queries) 1 December 31st 04 07:40 AM


All times are GMT +1. The time now is 03:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"