XfortunaX
New Member
- Joined
- Aug 28, 2014
- Messages
- 28
Hi,
I am looking to copy 4 cells of formulas down one row. One of the formulas is an array. What I came up with copies the formulas down but they still reference the cell from the line above.
I would like to add a border to the active row B:H at the end.
<code style="font-family: "Courier New", courier, monospace; margin: 0px 2px; padding: 15px; border: 0px; background-color: transparent; border-radius: 2px; word-break: normal; display: block; font-size: 1em; line-height: 16px; overflow: auto;">Private Sub cmdOk_Click()
Dim RowNum As Long
RowNum = Range("B8").End(xlDown).Offset(1, 0).Row
Cells(RowNum, 2).Value = TxtEmployeeID
Cells(RowNum, 3).Value = txtLastname & "," & " " & txtFirstname
Cells(RowNum, 4).Value = CDate(dtpDate)
Unload Me
Cells(RowNum, 5).FormulaArray = Cells(RowNum - 1, 5).FormulaArray
Cells(RowNum, 6).Formula = Cells(RowNum - 1, 6).Formula
Cells(RowNum, 7).Formula = Cells(RowNum - 1, 7).Formula
Cells(RowNum, 8).Formula = Cells(RowNum - 1, 8).Formula
End Sub
</code>Any help would be greatly appreciated.
Thank you,
JT
I am looking to copy 4 cells of formulas down one row. One of the formulas is an array. What I came up with copies the formulas down but they still reference the cell from the line above.
I would like to add a border to the active row B:H at the end.
<code style="font-family: "Courier New", courier, monospace; margin: 0px 2px; padding: 15px; border: 0px; background-color: transparent; border-radius: 2px; word-break: normal; display: block; font-size: 1em; line-height: 16px; overflow: auto;">Private Sub cmdOk_Click()
Dim RowNum As Long
RowNum = Range("B8").End(xlDown).Offset(1, 0).Row
Cells(RowNum, 2).Value = TxtEmployeeID
Cells(RowNum, 3).Value = txtLastname & "," & " " & txtFirstname
Cells(RowNum, 4).Value = CDate(dtpDate)
Unload Me
Cells(RowNum, 5).FormulaArray = Cells(RowNum - 1, 5).FormulaArray
Cells(RowNum, 6).Formula = Cells(RowNum - 1, 6).Formula
Cells(RowNum, 7).Formula = Cells(RowNum - 1, 7).Formula
Cells(RowNum, 8).Formula = Cells(RowNum - 1, 8).Formula
End Sub
</code>Any help would be greatly appreciated.
Thank you,
JT