View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Rodrigo Ferreira Rodrigo Ferreira is offline
external usenet poster
 
Posts: 79
Default INSERTAR FILA DE COLOR

....
Selection.Rows(i).EntireRow.Insert
Selection.Rows(i + 1).Interior.ColorIndex = 5
....


Rodrigo Ferreira


"Pepito" escreveu na mensagem
ups.com...
Hola :

Tengo una rutina en VBA el cual, su funcion es insertar una fila
en blanco, si en un rango se encuentra una celda vacia, deseo
insertar la fila pero que la ponga de color azul, seria de mucha
ayuda si me indicaran que lineas modificar.

el codigo es el siguiente :

Sub Borrar_fila()
Dim i As Long

'We turn off calculation and screenupdating to speed up the macro.
With Application
' .Calculation = xlCalculationManual
.ScreenUpdating = False

'We work backwards because we are deleting rows.
For i = Selection.Rows.Count To 1 Step -1

If WorksheetFunction.CountA(Selection.Rows(i)) = 0 Then
Selection.Rows(i).EntireRow.Insert
End If

Next i
.ScreenUpdating = True
End With
End Sub