PDA

View Full Version : find a way to copy link



gitan
10-10-2007, 07:24 PM
i had difficuity to copy automatically one page of link.

here are codes tested with success.

Sub FindIndex()

Dim IndexName As String
IndexName = Cells(27, 9)

Windows("Book1.xls").Activate

Cells.Find(What:=IndexName, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, MatchByte:=False, SearchFormat:=False).Activate
ActiveCell.Range("A1:N21").Select
Selection.Copy
Windows("Book2.xls").Activate

Range("A1:N21").Select
ActiveSheet.Paste
ActiveSheet.Paste Link:=True

End Sub