when I run the macro below the new workbook is created but no data shows?
Can anyone help?
Sub Copy()
Dim ws As Worksheet
Dim CellstoCopy() As Variant
Dim x As Integer
For Each ws In ThisWorkbook.Worksheets
ReDim Preserve CellstoCopy(x + 1)
CellstoCopy(x) = ws.[g13]
CellstoCopy(x + 1) = ws.[g32]
x = x + 2
Next ws
Workbooks.Add
Range(Cells(1, 1), Cells(1, x)) = CellstoCopy
End Sub
Can anyone help?
Sub Copy()
Dim ws As Worksheet
Dim CellstoCopy() As Variant
Dim x As Integer
For Each ws In ThisWorkbook.Worksheets
ReDim Preserve CellstoCopy(x + 1)
CellstoCopy(x) = ws.[g13]
CellstoCopy(x + 1) = ws.[g32]
x = x + 2
Next ws
Workbooks.Add
Range(Cells(1, 1), Cells(1, x)) = CellstoCopy
End Sub