View Single Post
 
Old 11-25-2016, 08:10 AM
rod147 rod147 is offline Windows XP Office 2007
Novice
 
Join Date: Oct 2009
Posts: 3
rod147 is on a distinguished road
Default

Nosparks, Highlighted DestSh is now coming up as Invalid qualifier.
Originally I had "Dim DestSh As Worksheet" rather than "string"?



Sub CopyDataWithoutHeaders()
Dim sh As Worksheet
Dim DestSh As String
Dim Last As Long
Dim shLast As Long
Dim CopyRng As Range
Dim StartRow As Long

With Application
.ScreenUpdating = False
.EnableEvents = False
End With

' Clear the summary sheet.
DestSh = "RDBMergeSheet"
With Sheet26 '<~~~~ the sheet's code name
.UsedRange.ClearContents
.Name = DestSh
End With

' Fill in the start row.
StartRow = 7

' Loop through all worksheets and copy the data to the
' summary worksheet.
For Each sh In ActiveWorkbook.Worksheets
If sh.Name <> DestSh.Name Then
Reply With Quote