Bit of an odd question, I have the following code which copies data from various sheets, and pastes it into another workbook.
What I'm finding is that the data that resides in the grouped columns (i.e. Data > Group) isn't being copied (it only occurs when the grouped columns are closed)?!
Is there any way to resolve the issue without having to open the grouped columns before copying the required data set?
Code:
Sub CreateCapture()
Dim ws As Worksheet
Application.ScreenUpdating = False
Workbooks.Open Filename:="C:\Users\Joe Bloggs\Desktop\RTT\Admin\Capture.xls"
Windows("Cotswolds.xls").Activate
With Worksheets("People_Data").Select
Range("C12:V12", Range("C" & Rows.Count).End(xlUp)).Select
Application.CutCopyMode = False
Selection.Copy
Windows("Capture.xls").Activate
Sheets("People_Data").Select
Range("C12").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End With
Windows("Cotswolds.xls").Activate
With Worksheets("Successors_for_Roles").Select
Range("C12:P12", Range("C" & Rows.Count).End(xlUp)).Select
Application.CutCopyMode = False
Selection.Copy
Windows("Capture.xls").Activate
Sheets("Successors_for_Roles").Select
Range("C12").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("People_Data").Select
Range("C12").Select
End With
Application.Dialogs(xlDialogSaveAs).Show
If Err = cdlCancel Then
ActiveWorkbook.Close SaveChanges:=False
Exit Sub
End If
Application.ScreenUpdating = True
End Sub
What I'm finding is that the data that resides in the grouped columns (i.e. Data > Group) isn't being copied (it only occurs when the grouped columns are closed)?!
Is there any way to resolve the issue without having to open the grouped columns before copying the required data set?