Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/12/2008, 13:59
HusqNiva
 
Fecha de Ingreso: diciembre-2008
Mensajes: 10
Antigüedad: 15 años, 4 meses
Puntos: 0
Bucle vb para excel

Hola gente.

Tengo un problema que no puedo solucionar, ni después de recorrer toda la red.

En una hoja de cálculo, necesito hacer un bucle :

For i = 1 to ValorDeCelda

no me coje ninguna variable :
_______________________________

Sub Repite_Entrada()

Dim RValor As Long

RValor = Cells(13, 5).Value

For i = 1 To RValor

Range("N5:Q5").Select
Selection.Copy
Range("AC4").Select
Cells.Find(What:="", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False).Activate
ActiveSheet.Paste
Application.CutCopyMode = False
Next i

End Sub
___________________-

en cambio si le meto un numero en vez de la variable, me funciona perfectamente.

(me perdonareis si veis cosas raras por aquí, pero lo mio no es precisamente la informática).

Venga. Birra para todos.

Juanjo