Inactiver183192
New Member
- Joined
- Jun 12, 2011
- Messages
- 15
Hi all first post!
I'm still learning but this one is probably an easy one. I just want to copy a dynamic range from all open workbooks (or windows? I still get a bit confused with which one to use) and then create a new worksheet in the one file "Datadump" and copy that data to it. So each open workbook data is now in its own worksheet in the one workbook. I was hoping to scroll through the open workbooks but I'm obviously missing something.
My second query was regarding the bypassing of the clipboard when you copy paste. Is there a way to do for a destination that will be newly created? I'd appreciate any help thank you!
I'm still learning but this one is probably an easy one. I just want to copy a dynamic range from all open workbooks (or windows? I still get a bit confused with which one to use) and then create a new worksheet in the one file "Datadump" and copy that data to it. So each open workbook data is now in its own worksheet in the one workbook. I was hoping to scroll through the open workbooks but I'm obviously missing something.
My second query was regarding the bypassing of the clipboard when you copy paste. Is there a way to do for a destination that will be newly created? I'd appreciate any help thank you!
Code:
Sub ImportData()
Dim WBnum As Integer
Dim WB As Workbook
For Each WB In Workbooks
If WB.Name <> "Datadump.xls" Then
Range("B1", Range("B1").End(xlToRight)).Copy
Workbooks("Datadump.xls").Worksheets.Add
Range("B20").PasteSpecial
End If
Next WB