Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/12/2006, 00:17
AprendizMexicano
 
Fecha de Ingreso: julio-2006
Mensajes: 19
Antigüedad: 17 años, 9 meses
Puntos: 0
Ayuda corregir macro

Buen dia a todos:

Encontre esta macro en internet, lo que hace es separar por semanas un listado insertando una fila vacia, quisiera que me hiciera la separación pero por mes, ya intente cambiando weekday por month pero no me ningun resultado.

Sub ShowWeeks()
Dim iToday As Integer
Dim iYesterday As Integer

Range("B11").Select
iYesterday = Weekday(ActiveCell.Value)
Do Until IsEmpty(ActiveCell.Value)
ActiveCell.Offset(1, 0).Select
iToday = Weekday(ActiveCell.Value)
If iToday < iYesterday Then
ActiveCell.EntireRow.Insert
ActiveCell.Offset(1, 0).Select
End If
iYesterday = iToday
Loop
Range("A1").Select
End Sub

Les agradezco de antemano sus comentarios.

Feliz navidad y prospero año nuevo para todos

Saludos