D
Daniel
Hi all,
i have a small problem and it follows:
I need to search 1 column ( say A ) and find the last cell. From there
i want to step five cells back, copy every value for each on and paste
them into a specific textbox i have in a userform.
My code so far look like this:
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
Dim nr1 As Integer, nr2 As Integer, nr3 As Integer, n4 As Integer, nr5
As Integer
''''This is the values i want to put in my textboxes!!!
nr1 = ActiveCell.Offset(-1, 0).Select And ActiveCell.Copy
nr2 = ActiveCell.Offset(-1, 0).Select And ActiveCell.Copy
nr3 = ActiveCell.Offset(-1, 0).Select And ActiveCell.Copy
nr4 = ActiveCell.Offset(-1, 0).Select And ActiveCell.Copy
nr5 = ActiveCell.Offset(-1, 0).Select And ActiveCell.Copy
End Sub
PS Im a beginner, started last week so please try to keep it simple
i have a small problem and it follows:
I need to search 1 column ( say A ) and find the last cell. From there
i want to step five cells back, copy every value for each on and paste
them into a specific textbox i have in a userform.
My code so far look like this:
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
Dim nr1 As Integer, nr2 As Integer, nr3 As Integer, n4 As Integer, nr5
As Integer
''''This is the values i want to put in my textboxes!!!
nr1 = ActiveCell.Offset(-1, 0).Select And ActiveCell.Copy
nr2 = ActiveCell.Offset(-1, 0).Select And ActiveCell.Copy
nr3 = ActiveCell.Offset(-1, 0).Select And ActiveCell.Copy
nr4 = ActiveCell.Offset(-1, 0).Select And ActiveCell.Copy
nr5 = ActiveCell.Offset(-1, 0).Select And ActiveCell.Copy
End Sub
PS Im a beginner, started last week so please try to keep it simple