Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to paste link when combine worksheets into one

Status
Not open for further replies.

UongSaki

Technical User
Nov 15, 2003
65
US
I got this code:

Sub Combine()
Dim J As Integer

On Error Resume Next
Sheets(1).Select
Worksheets.Add ' add a sheet in first place
Sheets(1).Name = "Combined"

' copy headings
Sheets(2).Activate
Range("A1").EntireRow.Select
Selection.Copy Destination:=Sheets(1).Range("A1")

' work through sheets
For J = 2 To Sheets.Count ' from sheet 2 to last sheet
Sheets(J).Activate ' make the sheet active
Range("A1").Select
Selection.CurrentRegion.Select ' select all cells in this sheets

' select all lines except title
Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select

' copy cells selected in the new sheet on last line
Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
Next
End Sub

from
How do you paste link the data onto the combine sheet?

Thank you.
 
Hi,

1. Please post VBA (macro) questions in Forum707.

2. "How do you paste link the data onto the combine sheet?"

Have you tried using you macro recorder?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thank you. I'll re-post my question there.

I tried macro recorder and I got this snippet, ActiveSheet.Paste Link:=True. I don't know where modify the code above with this code.

Thans,

Saki
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top