+ Reply to Thread
Results 1 to 5 of 5

I use a barcode reader to populate the "warehouse" database via Excel UserForm

  1. #1
    Registered User
    Join Date
    09-07-2020
    Location
    slovakia
    MS-Off Ver
    office2016
    Posts
    2

    Post I use a barcode reader to populate the "warehouse" database via Excel UserForm

    I am a beginner in VBA programming. I use a barcode reader to fill a database "warehouse" via Excel UserForm which has 3 elements - ComboBox1 - TabIndex = 0 this is a field with the name of the goods, TextBox1-TbIndex = 1 this is a quantity, and CommandButton1 - (Confirm ) TabIndex2.
    The form works great only after TabIndex2, when the loop should follow to return to TabIndex = 0, to fill the next item, and here I am still clueless.
    I used the attached code where the section "Me! ComboBox1.TabIndex = 0"
    I found it on the net to move on. This is how the program works for me, but it's a primitive solution and it should definitely look different.
    I would like to ask if there is anyone who can help me with this - he would advise.
    Thank you very much in advance
    Edokra
    Please Login or Register  to view this content.
    Last edited by davesexcel; 09-07-2020 at 07:33 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,264

    Re: I use a barcode reader to populate the "warehouse" database via Excel UserForm

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    11,259

    Re: I use a barcode reader to populate the "warehouse" database via Excel UserForm

    Also...See Top Yellow banner for sample Upload instructions...
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Registered User
    Join Date
    09-07-2020
    Location
    slovakia
    MS-Off Ver
    office2016
    Posts
    2

    Post Incorrect function of theUserForm form in Excel, when filling the database via Barcode.

    Hello everyone
    I am a beginner in VBA programming. Using a barcode reader, I fill the "warehouse" of the database via Excel UserForm, which has 3 elements - ComboBox1 - TabIndex = 0, this is a field with the name of the product, TextBox1-TbIndex = 1, this is the quantity and CommandButton1 - TabIndex = 2, has a function "Confirm"
    My problem is that when I load a Barcode into a UserForm in the form element "ComboBox1" it loads it and automatically goes to "TextBox1" where I manually fill in the quantity and click "CommandButton1", the data is displayed in the database.
    Here begins the problem that the form should repeat the cycle and go again to the element "Combo Box" (TabIndex = 0 ") but the cycle freezes and it is necessary to click the PC key" TAB "then" Delete "and only then the form is ready (cursor flashes) and I can load another Barcode entry into the database.
    So the problem is that I can't advise how to replace "TAB" and "Delete" in the program. This is the case when I use the code where the lines have "Rem. But my program works when I remove the elements" Rem ", where the form is practically resetted mainly with the help of:

    Unload UserForm13
    UserForm13.Show

    So here is my problem and my request that someone be willing to help me solve my code.
    Thank you very much in advance

    Here is my code:

    Private Sub CommandButton1_Click ()
    'Macro for UserForm and Barcode
    'Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual
    Dim x As Integer 'Variant
    Dim y As Integer
    Dim cel As Range
    Dim ComboBox As Integer 'ComboBox1
    Dim Textbox As Integer 'TextBox1
    Dim CommandButton As Integer 'CommandButton1
    Dim Keycode As Integer

    x = Range ("B114") + 1
    y = Range ("D114") + 2
    Range ("F114"). Select
    'ActiveSheet.Select' ???
    Selection.Copy
    Cells (x, y) .Select
    ScreenUpdating = False

    Selection.PasteSpecial Paste: = xlPasteAll, Operation: = xlNone, SkipBlanks: = _
    False, Transpose: = False
    Application.CutCopyMode = False

    Rem Me! ComboBox1.TabIndex = 0
    Rem Me! TextBox1.TabIndex = 1
    Rem Me! CommandButton1.TabIndex = 2
    Rem Me! ComboBox1.Text = ""
    ScreenUpdating = True

    Rem Unload UserForm13
    Rem UserForm13.Show
    Application.Calculation = xlCalculationAutomatic

    End Sub

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,264

    Re: Incorrect function of theUserForm form in Excel, when filling the database via Barcode

    Hello,
    Did you happen to read the two posts replying to your original post?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Populate a Userform with "Next" & "Previous" row data using VBA
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2018, 04:47 PM
  2. [SOLVED] if formula needed to populate either "1" or "0" based on number of units in another cell
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-07-2015, 11:24 AM
  3. [SOLVED] populate "skip" labels in userform with the correct answer
    By intex in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-19-2014, 02:36 PM
  4. userform for data entry into "Database"
    By johncena in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2013, 01:14 PM
  5. barcode reader and excel problem.
    By bradbev in forum Excel General
    Replies: 1
    Last Post: 06-12-2008, 02:47 PM
  6. [SOLVED] does excell have a free "reader" program like powerpoint
    By raymondao in forum Excel General
    Replies: 3
    Last Post: 02-21-2006, 11:00 AM
  7. Using Access database to "populate" Excel Sheets
    By maacmaac in forum Excel General
    Replies: 1
    Last Post: 09-19-2005, 01:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1