Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 774
- Office Version
- 365
- 2019
- Platform
- Windows
My current macro works perfectly, but because I had to change my database to an Excel table this current macro needs work. My worksheet is "Pallets" and the table is named "Table1".
Again before the table it worked perfectly but changing the source to a table makes a non-workable solution.
Macro in need of updating:
Again before the table it worked perfectly but changing the source to a table makes a non-workable solution.
Macro in need of updating:
VBA Code:
Private Sub cmdEdit2_Click()
If Selected_list2 = 0 Then
MsgBox "No row is selected.", vbOKOnly + vbInformation, "Edit"
Exit Sub
End If
Me.txtRowNumber2.Value = Selected_list2 + 1
Me.txtDate.Value = Me.lstDatabase.List(Me.lstDatabase.ListIndex, 0)
Me.txtDestination.Value = Me.lstDatabase.List(Me.lstDatabase.ListIndex, 1)
Me.txtPalletID.Value = Me.lstDatabase.List(Me.lstDatabase.ListIndex, 2)
Me.txtTcns.Value = Me.lstDatabase.List(Me.lstDatabase.ListIndex, 3)
Me.txtPieces.Value = Me.lstDatabase.List(Me.lstDatabase.ListIndex, 4)
Me.txtWeight.Value = Me.lstDatabase.List(Me.lstDatabase.ListIndex, 5)
Me.cmbShipment.Value = Me.lstDatabase.List(Me.lstDatabase.ListIndex, 6)
Me.cmbSupport.Value = Me.lstDatabase.List(Me.lstDatabase.ListIndex, 8)
Me.txtRemarks.Value = Me.lstDatabase.List(Me.lstDatabase.ListIndex, 9)
MsgBox "Please make the required changes and click on 'Save' button to update,", vbOKOnly + vbInformation, "Edit"
End Sub