Hi all,
I am currently working on an order form for our warehouse.
I have a master sheet (Template) which holds all the current items we stock. When entering the quantity to be ordered on the master sheet, it is transferred to the Order Form.
Here is the code used for the transfer of data:
A few problems I have been having:
When changing the quantity to be ordered from one value to another, it duplicates the item on the Order Form instead of updating the value.
I would like to password protect the Order sheet and lock all cells that don't require editing, but still allow the code to transfer data from the master sheet.
Any help would be greatly appreciated!
I am currently working on an order form for our warehouse.
I have a master sheet (Template) which holds all the current items we stock. When entering the quantity to be ordered on the master sheet, it is transferred to the Order Form.
Here is the code used for the transfer of data:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("H:H")) Is Nothing Then
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
Dim Lastrow As Long
Lastrow = Sheets("Order Form").Cells(Rows.Count, "A").End(xlUp).Row + 1
Rows(Target.Row).Copy Destination:=Sheets("Order Form").Rows(Lastrow)
Sheets("Order Form").Rows(Lastrow).Value = Sheets("Order Form").Rows(Lastrow).Value
End If
End Sub
A few problems I have been having:
When changing the quantity to be ordered from one value to another, it duplicates the item on the Order Form instead of updating the value.
I would like to password protect the Order sheet and lock all cells that don't require editing, but still allow the code to transfer data from the master sheet.
Any help would be greatly appreciated!