OK, so here is what I’ve come up with on my own. One sub named "WorkbookCollection" uses a for/each next statement to work through any and all open workbooks and another sub named "SliceAndDice" manipulates the spreadsheet data. It all seems to work fine.
I need tow things, suggestions on anything I might be missing to clean this up since I'm an armature, and a suggestion on how I can keep the copy and paste procedure from copying a text box I have on my SliceAndDice spreadsheet.
Thanks again for the help.
Sub WorkbookCollection()
'
' WorkbookCollection Macro
' Macro first recorded 8/4/2008 by Rod Cathcart
'
'
For Each w In Workbooks
If w.Name <> ThisWorkbook.Name Then
SliceAndDice w.Name
w.Close savechanges:=True
End If
Next w
End Sub
Sub SliceAndDice(NextWorkbook)
'
' SliceAndDice Macro
' Macro first recorded 8/4/2008 by Rod Cathcart
'
' This Macro is a work in progress, I plan to pass a workbook
' name to this sub and run the slice and dice on that workbook.
'Copy columns D2-AE from source workbook and paste into DataDicer
Windows(NextWorkbook).Activate
Range("D2:AE740").Select
Application.CutCopyMode = False
Selection.Copy
Windows("DataDicer.xls").Activate
Range("B2").Select
ActiveSheet.Paste
'
'Copy columns AF-AG from source workbook and paste into DataDicer
Windows(NextWorkbook).Activate
Range("AF2:AG740").Select
Selection.Copy
Windows("DataDicer.xls").Activate
Range("AF2").Select
ActiveSheet.Paste
'
'Copy columns A from source workbook and paste to column AH in DataDicer
Windows(NextWorkbook).Activate
Range("A2:A740").Select
Application.CutCopyMode = False
Selection.Copy
Windows("DataDicer.xls").Activate
Range("AH2").Select
ActiveSheet.Paste
'
'Copy columns C and paste to column A
Windows(NextWorkbook).Activate
Range("C2:C740").Select
Application.CutCopyMode = False
Selection.Copy
Windows("DataDicer.xls").Activate
Range("A2").Select
ActiveSheet.Paste
'
'Delete all data from source workbook and replace it with
'reorganized data from the DataDicer
Windows(NextWorkbook).Activate
Range("A1:AG740").Select
Selection.ClearContents
Windows("DataDicer.xls").Activate
Range("A1:AH740").Select
Selection.Copy
Windows(NextWorkbook).Activate
Range("A1").Select
ActiveSheet.Paste
'
'Delete all data below row 1 of DataDicer, format columns on source workbook
Windows("DataDicer.xls").Activate
Range("A2:AH740").Select
Selection.ClearContents
Range("A1").Select
Windows(NextWorkbook).Activate
Columns("A:AH").Select
Columns("A:AH").EntireColumn.AutoFit
Range("A1").Select
'
End Sub
Bookmarks