Hello!
I currently have an order form (workbook A sheet 1) with a code in it with a button that allows me to take all of the necessary information filled out in the form and transfer it to a shipping form (workbook B sheet 1).
What I would like to do is change is such that when the button is clicked a pop up box appears with all of the part numbers that have been added to the form with a text box asking the quantity that I would like to ship!
Therefore, the code would need to be able to sense if there is anything filled out in the 'Part Number' column and have that value pop up in the box with the option to add a quantity to it.
Here is a pic of what I am looking for:
quantity.png
The problem is that there could be any amount of parts in the order. I need the pop up to be able to change all of their quantities.
Here is a modified version of the existing code I was using before the pop up box:
Sub Quote()
'
' Quote Macro
'
Dim OrderNo As String
OrderNo = Cells(x, x).Value
Customer = Cells(x, x).Value
Name = Cells(x, x).Value
Dim PartNo(100) As String
Dim Description(100) As String
Dim Quantity(100) As Integer
Dim iRow As Integer
iRow = xx
Do Until IsEmpty(Cells(iRow, 1))
iRow = iRow + 1
PartNo(iRow) = Cells(iRow, 1).Value
Description(iRow) = Cells(iRow, 2).Value
Remark(iRow) = Cells(iRow, 3).Value
Quantity(iRow) = Cells(iRow, 4).Value
Loop
maxRow = iRow
iRow = xx
Workbooks.Open Filename:="[opens ship form]", _
UpdateLinks:=0
Cells(x, x).Value = OrderNo
Cells(x, x).Value = Date
Cells(x, x).Value = Customer
kRow = xx
Do Until iRow = maxRow
Cells(kRow, 1).Value = PartNo(iRow)
Cells(kRow, 6).Value = Description(iRow)
Cells(kRow, 18).Value = Quantity(iRow)
If Remark(iRow) = " " Then
kRow = kRow + 1
iRow = iRow + 1
Else
kRow = kRow + 1
Cells(kRow, 6).Value = Remark(iRow)
kRow = kRow + 1
iRow = iRow + 1
End If
Loop
ChDir [save as command]
ActiveWindow.Close savechanges:=False
End Sub
Bookmarks