Barra de progreso como insertarla en la macro

Para Dante Amor:Dame una mano no la puedo hacer funcionar, dime cual es el error

Private Sub UserForm_Activate()
'Referencia: http://support.microsoft.com/kb/211736/es
'Mod.Por.Dante Amor
LProgress.Width = 0
principal
End Sub
Sub principal()
'Por.Dante Amor
Application.ScreenUpdating = False
con = 1
rep = 10
Label1 = "Procesando ..."
fin = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To fin
End Sub
Sub copia_hojas2()
Dim ws As Worksheet, iFile$, iRow&, mFolder$
Set ws = ActiveSheet
ws.Range(ws.[a1], ws.[a1].SpecialCells(11)).Offset(1).Delete xlShiftUp
iRow = 2
Folders = Array(ThisWorkbook.Path & "\chequeo", _
ThisWorkbook.Path & "\mdf", _
ThisWorkbook.Path & "\mantenimiento\electrico", _
ThisWorkbook.Path & "\mantenimiento\mecanico")
For i = LBound(Folders) To UBound(Folders)
mFolder = Folders(i)
iFile = Dir(mFolder & "\*.xls*")
Do Until iFile = ""
Call copiar(ws, iRow, mFolder, iFile)
iFile = Dir
Loop
Next
'
MsgBox "Todo los archivos verificados"
End Sub
'
Sub copiar(ws, iRow, mFolder, iFile)
With ws.Cells(iRow, "a").Resize(150, 7)
.Formula = "=if('" & mFolder & "\[" & iFile & "]5porque'!g19 ="""", """" ,'" & mFolder & "\[" & iFile & "]5porque'!g19)"
.Value = .Value
End With
iRow = iRow + 150
tope = ActiveSheet.UsedRange.Row + ActiveSheet.UsedRange.Rows.Count - 1
For f = tope To 1 Step -1
If Application.WorksheetFunction.CountA(Rows(f)) = 0 Then Rows(f).EntireRow.Delete
Next
Columns("A:A").WrapText = True
Columns("B:B").WrapText = True
Columns("C:C").WrapText = True
Columns("D:D").WrapText = True
If (con * 100) / fin >= rep Then
UpdateProgressBar rep
rep = rep + 10
End If
con = con + 1
Application.ScreenUpdating = True
Label1 = "Proceso Terminado"
End Sub
Sub UpdateProgressBar(ava)
'Por.Dante Amor
UserForm1.Frame1.Caption = Int(ava) & " %"
LProgress.Width = LProgress.Width + 30
DoEvents
Application. Wait Now + TimeValue("00:00:01")
End Sub

Añade tu respuesta

Haz clic para o