Userform Textboxes values passing to a listbox

NDMDRB

Board Regular
Joined
Jun 20, 2016
Messages
164
Office Version
  1. 2016
Platform
  1. Windows
Hello,

Please I need your help.

I have the link below for my shop workbook "example workbook" that contains a userform to manage my invoices

I'm stuck in the following steps and don't know how to solve them, and need your help if you may


  • In TextBox "txtBarCode", If I search for an item by "Barcode Scanner" then run the "txtBarCode Change Event", but in case I need to enter the Barcode manually change the code event to "After Update"


  • Then If the item exist or not (I have a code to lookup the values and put them on TextBoxes, but I need them in the list box)
    • Add the values to ListBox1 that contains 6 columns (Num / Barcode / Item Name / Unit Price / Qty / Amount) as header
      • Row1 Column"Num" = Count the entered rows unless the header
      • Row1 Column"Barcode" = txtBarCode
      • Row1 Column"Qty" = txtQty
      • Row1 Column"Item Name, Unit Price, and Amount" = lookup values reference to the entered Barcode (same code that I have)
      • Next item add to next row...


  • If I need to search by name, I tried the lookup code as on "txtBarCode" with "After Updat Event" but it didn't work
    • I need to check if the entered name is exist or not (the same as on txtBarCode)
    • In case the item exist, lookup the Barcode of this item and put it in txtBarCode


  • On Submit button, add the list box values to sheet2 (check the last empty row)


Here is the link for the workbook file
https://drive.google.com/file/d/1mW-H6tsO4yjfIHNIBdS8cIm8sSA5KlL8/view?usp=sharing
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,214,426
Messages
6,119,411
Members
448,894
Latest member
spenstar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top