Sub GetWBSTab()
Application.ScreenUpdating = False
Dim Consolidate As Workbook
Dim BOEBook As Workbook
Set Consolidate = ThisWorkbook
BOEFile = Application.GetOpenFilename("Excel files (*.xls*), *.xls*")
If BOEFile <> False Then
Workbooks.Open (BOEFile)
Set BOEBook = ActiveWorkbook
'Remove Formulas
If Evaluate("isref(WBS_Dictionary!a1)") Then
MsgBox "The Selected Workbook does not contain a WBS_Dictionary tab"
Exit Sub
Else
ActiveWorkbook.Sheets("WBS_Dictionary").Activate
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
'Remove Data Validation
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop, Operator _
:=xlBetween
.IgnoreBlank = True
.InCellDropdown = True
.ShowInput = True
.ShowError = True
End With
Selection.ClearComments
'Remove Button
ActiveSheet.Shapes.Range(Array("CommandButton1")).Select
Selection.Delete
ActiveWorkbook.Sheets("WBS_Dictionary").Copy Consolidate.Sheets(Consolidate.Sheets.Count)
End If
BOEBook.Close False
Else
Exit Sub