Professional Documents
Culture Documents
Sub Unificar_Tabelas()
sPathFile = Application.ActiveWorkbook.Path + "\Input\"
Call OptimizeCode_Begin
sThisSheet = "Rollout"
Set wbThisWorkbook = ThisWorkbook
Call FillCollections
iThisRow = 8
sSiteHandler = wbThisWorkbook.Sheets(sThisSheet).Range("E" & iThisRow).Value
Call FillWithReportSH
Call FillWithEngenharia
Call FillWithRolloutTim
Call FillWithMasterPontoA
Call FillWithMasterPontoB
iThisRow = iThisRow + 1
sSiteHandler = wbThisWorkbook.Sheets(sThisSheet).Range("E" &
iThisRow).Value
Loop
wbReportSh.Close
wbEngenharia.Close
wbRolloutTim.Close
wbMaster.Close
Call OptimizeCode_End
End Sub
Sub OptimizeCode_Begin()
Application.ScreenUpdating = False
EventState = Application.EnableEvents
CalcState = Application.Calculation
PageBreakState = ActiveSheet.DisplayPageBreaks
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
ActiveSheet.DisplayPageBreaks = False
End Sub
Sub OptimizeCode_End()
ActiveSheet.DisplayPageBreaks = PageBreakState
Application.Calculation = CalcState
Application.EnableEvents = EventState
Application.ScreenUpdating = True
End Sub
Sub FillCollections()
End Sub
iRow = iRow + 1
oCellValue = oWorkBook.Sheets(sSheetName).Range(sColumn & iRow).Value
iQuantity = cCollection.Count
End Function
Application.DisplayAlerts = False
With oWorkBook
.CheckCompatibility = False
.SaveAs FilePath, FileFormat:=51
.Close
End With
Application.DisplayAlerts = True
End Sub
Sub FillWithReportSH()
iRow = cReportSh.Item(sSiteHandler)
Call FillRowWithReportSH(iRow, "DRT")
End Sub
End Sub
End Function
Sub FillWithEngenharia()
iRow = cEngenharia.Item(sSiteHandler)
Call FillRowWithEngenharia(iRow, "List")
End Sub
End Sub
Sub FillWithRolloutTim()
End Sub
End Sub
Sub FillWithMasterPontoA()
iRow = cMaster.Item(sPontoA)
Call FillRowWithMasterPontoA(iRow, "ENTREGUE")
End Sub
End Sub
Sub FillWithMasterPontoB()
iRow = cMaster.Item(sPontoB)
Call FillRowWithMasterPontoB(iRow, "ENTREGUE")
End Sub
End Sub