Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Can I have Paste Link copy formating?

I have a macro (Excel 2003) that paste links into another worksheet, however,
the formating of the font (size and color) does not come across.
Sheets("Highlights").Select
Range("$AR$2:$AR$2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Summary").Select
Range("J2").Select
ActiveSheet.Paste Link:=True

I noticed that if I do this manually, it works( color comes across). Is
there a special form of the paste link command to use?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Can I have Paste Link copy formating?

Pasting the link essentially builds a formula that points back to that original
cell/range.

You could record a macro when you copy the range and edit|paste special|formats
and have your code.

Be aware that this formatting won't change if the formatting of the original
range changes.

CarloPel wrote:

I have a macro (Excel 2003) that paste links into another worksheet, however,
the formating of the font (size and color) does not come across.
Sheets("Highlights").Select
Range("$AR$2:$AR$2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Summary").Select
Range("J2").Select
ActiveSheet.Paste Link:=True

I noticed that if I do this manually, it works( color comes across). Is
there a special form of the paste link command to use?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Can I have Paste Link copy formating?

OK, but it doesn't work:

Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Macro fails with error code 1004 "PasteSpecial method of Range class failed"
if I insert this into the code below.

"Dave Peterson" wrote:

Pasting the link essentially builds a formula that points back to that original
cell/range.

You could record a macro when you copy the range and edit|paste special|formats
and have your code.

Be aware that this formatting won't change if the formatting of the original
range changes.

CarloPel wrote:

I have a macro (Excel 2003) that paste links into another worksheet, however,
the formating of the font (size and color) does not come across.
Sheets("Highlights").Select
Range("$AR$2:$AR$2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Summary").Select
Range("J2").Select
ActiveSheet.Paste Link:=True

I noticed that if I do this manually, it works( color comes across). Is
there a special form of the paste link command to use?


--

Dave Peterson
.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Can I have Paste Link copy formating?

Dim RngToCopy As Range
Dim DestCell As Range

With Worksheets("Highlights")
Set RngToCopy = .Range("ar2", .Range("ar2").End(xlDown))
End With

Set DestCell = Worksheets("Summary").Range("J2")

RngToCopy.Copy
Application.Goto DestCell
ActiveSheet.Paste link:=True

RngToCopy.Copy
DestCell.PasteSpecial Paste:=xlPasteFormats



CarloPel wrote:

OK, but it doesn't work:

Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Macro fails with error code 1004 "PasteSpecial method of Range class failed"
if I insert this into the code below.

"Dave Peterson" wrote:

Pasting the link essentially builds a formula that points back to that original
cell/range.

You could record a macro when you copy the range and edit|paste special|formats
and have your code.

Be aware that this formatting won't change if the formatting of the original
range changes.

CarloPel wrote:

I have a macro (Excel 2003) that paste links into another worksheet, however,
the formating of the font (size and color) does not come across.
Sheets("Highlights").Select
Range("$AR$2:$AR$2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Summary").Select
Range("J2").Select
ActiveSheet.Paste Link:=True

I noticed that if I do this manually, it works( color comes across). Is
there a special form of the paste link command to use?


--

Dave Peterson
.


--

Dave Peterson
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
Copy paste, link problem Tkowal Excel Discussion (Misc queries) 0 October 23rd 09 12:28 AM
How can I copy/paste a hyperlink address without the link? voluptas Excel Discussion (Misc queries) 1 May 30th 06 04:16 AM
Copy and paste link in worksheet is extremely slow. What to doÉ Franco Excel Discussion (Misc queries) 0 September 21st 05 04:41 PM
Macro: Copy and Paste Boomberg Link excelman Excel Discussion (Misc queries) 3 August 17th 05 06:56 PM
Copy Paste Special Link Cell Problem cpetta Links and Linking in Excel 6 July 2nd 05 12:58 AM


All times are GMT +1. The time now is 08:16 AM.

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

About Us

"It's about Microsoft Excel"