Ver Mensaje Individual
  #6 (permalink)  
Antiguo 08/10/2008, 12:24
Avatar de mrocf
mrocf
 
Fecha de Ingreso: marzo-2007
Ubicación: Bs.As.
Mensajes: 1.103
Antigüedad: 17 años, 1 mes
Puntos: 88
Respuesta: VBA - Mensaje de espere

Hola! Laufwerk. Si reemplazas el bucle

For j
Next j

por lo siguiente, posiblemente llegues a una sustancial disminución del tiempo de operación:
Código:
Dim Celda As Range

For i = 2 To numRows(1) ' Filas del primer archivo
  Set Celda = Range(Range(Workbooks(3).Worksheets(1).Range(varCellDestinyColumn & 2)), _
    Range(Workbooks(3).Worksheets(1).Range(varCellDestinyColumn & numRows(2)))).Find( _
    What:=(Workbooks(2).Worksheets(1).Range(varCellOriginalColumn & i).Value), _
    LookIn:=xlValues, LookAt:=xlWhole)
        
  If Not Celda Is Nothing Then
    Windows(myBook(2)).Activate
    valueSearch = Celda.Value
    'drawColorRow (pos)
    Selection.Copy
    Windows(myBook(1)).Activate
    Workbooks(2).Sheets(1).Select
    Range(varCellInsertColumn & i).Value = valueSearch
    'drawColorRow (i)
    'ActiveSheet.Paste
  Else
    Windows(myBook(1)).Activate
    Rows(i & ":" & i).Select
    Range("N" & i).Activate
    With Selection.Interior
      .Pattern = xlSolid
      .PatternColorIndex = xlAutomatic
      .ThemeColor = xlThemeColorAccent2
      .TintAndShade = 0
      .PatternTintAndShade = 0
    End With
  End If
Next i

Set Celda = Nothing
Comenta -por favor- como te ha ido, ¿ok?

Saludos, Cacho.

Última edición por mrocf; 08/10/2008 a las 14:40