lucky12341
Board Regular
- Joined
- Nov 4, 2005
- Messages
- 121
The VBA code for a part form I am using is listed below. The file name is "Book1.xls" and there are three worksheets in it: "Inventory", "Purchased", "Used". This form is linked to the "Inventory" sheet. When I click on the accept button it brings up the debugger and says the form doesnt work, the others buttons work fine. Can anyone help me? thanks.
Private Sub Accept_Click()
ActiveWorkbook.Sheets("Inventory").Activate
Range("A1").Select
Do
If IsEmpty(ActiveCell) = FalseThen
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = PObox.Value
ActiveCell.Offset(0, 1) = PCMKbox.Value
ActiveCell.Offset(0, 2) = Partbox.Value
ActiveCell.Offset(0, 3) = Descriptionbox.Value
ActiveCell.Offset(0, 4) = Materialbox.Value
ActiveCell.Offset(0, 5) = Drawingbox.Value
ActiveCell.Offset(0, 6) = Qtybox.Value
ActiveCell.Offset(0, 7) = HICbox.Value
End Sub
Private Sub Accept_Click()
ActiveWorkbook.Sheets("Inventory").Activate
Range("A1").Select
Do
If IsEmpty(ActiveCell) = FalseThen
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = PObox.Value
ActiveCell.Offset(0, 1) = PCMKbox.Value
ActiveCell.Offset(0, 2) = Partbox.Value
ActiveCell.Offset(0, 3) = Descriptionbox.Value
ActiveCell.Offset(0, 4) = Materialbox.Value
ActiveCell.Offset(0, 5) = Drawingbox.Value
ActiveCell.Offset(0, 6) = Qtybox.Value
ActiveCell.Offset(0, 7) = HICbox.Value
End Sub