Thread: Help with link
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default Help with link

Try something like this (untested, not sure if copy/paste sheet is same or
different)

For Each c In Range(ActiveCell.Offset(0, 3).Address, lastC & i + 15)
If c.Interior.ColorIndex = 8 Then
Range(Address(c)).Copy
Cells(DestRow, DestCol + 1).Select
ActiveSheet.Paste Link:=True
Application.CutCopyMode = False
Cells(DestRow, DestCol + 1).NumberFormat = "0.000"
Cells(DestRow, DestCol + 1).Interior.ColorIndex = 8
End If

Next

Mike F

"gaba" wrote in message
...
Hi,
I need some help with copying and pasting special (link) the value of one
cell into another.

This is part of the code that I'm using. I've tried almost everything with
the link and is not working

For Each c In Range(ActiveCell.Offset(0, 3).Address, lastC & i + 15)
If c.Interior.ColorIndex = 8 Then
Cells(DestRow, DestCol + 1).Value = c.Value
'I need to link the destination cell with c.value
Cells(DestRow, DestCol + 1).NumberFormat = "0.000"
Cells(DestRow, DestCol + 1).Interior.ColorIndex = 8
End If

Next

Any help would be more than appreciated.
Thanks
--
gaba :)