C
cj2k2k
I have to send values from a form to column D every other row. Here is that
piece of code from my form. Currently, it sends only the first value
(Me.Pocket1.Value) then the loop ends. Could you tell me how to fix it?
I should mention that the reason why I'm trying to insert the value every
other row is because every 2 rows are merged down column D (such as D34 are
merged and so on).
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(2, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = Me.Pocket1.Value
ActiveCell.Offset(2, 0) = Me.Pocket2.Value
ActiveCell.Offset(4, 0) = Me.Pocket3.Value
ActiveCell.Offset(6, 0) = Me.Pocket4.Value
ActiveCell.Offset(8, 0) = Me.Pocket5.Value
ActiveCell.Offset(10, 0) = Me.Pocket6.Value
ActiveCell.Offset(12, 0) = Me.Pocket7.Value
ActiveCell.Offset(14, 0) = Me.Pocket8.Value
piece of code from my form. Currently, it sends only the first value
(Me.Pocket1.Value) then the loop ends. Could you tell me how to fix it?
I should mention that the reason why I'm trying to insert the value every
other row is because every 2 rows are merged down column D (such as D34 are
merged and so on).
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(2, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = Me.Pocket1.Value
ActiveCell.Offset(2, 0) = Me.Pocket2.Value
ActiveCell.Offset(4, 0) = Me.Pocket3.Value
ActiveCell.Offset(6, 0) = Me.Pocket4.Value
ActiveCell.Offset(8, 0) = Me.Pocket5.Value
ActiveCell.Offset(10, 0) = Me.Pocket6.Value
ActiveCell.Offset(12, 0) = Me.Pocket7.Value
ActiveCell.Offset(14, 0) = Me.Pocket8.Value