karolina1406
Board Regular
- Joined
- Apr 18, 2016
- Messages
- 110
- Office Version
- 365
- Platform
- Windows
I am using a Userform to populate my Order table. I am using the below code which is fine other than I have a formula in Column G but after populating the table with the Userform info - the formula is not copied. Cas someone help?
Dim oNewRow As ListRow
Dim rng As Range
Set rng = ThisWorkbook.Worksheets("Order_info").Range("NewOrderInfo")
rng.Select
Set oNewRow = Selection.ListObject.ListRows.Add(AlwaysInsert:=True)
With ws
oNewRow.Range.Cells(1, 1).Value = Me.OrderNumber.Value
oNewRow.Range.Cells(1, 2).Value = Me.CustomerName.Value
Dim oNewRow As ListRow
Dim rng As Range
Set rng = ThisWorkbook.Worksheets("Order_info").Range("NewOrderInfo")
rng.Select
Set oNewRow = Selection.ListObject.ListRows.Add(AlwaysInsert:=True)
With ws
oNewRow.Range.Cells(1, 1).Value = Me.OrderNumber.Value
oNewRow.Range.Cells(1, 2).Value = Me.CustomerName.Value