+ Reply to Thread
Results 1 to 7 of 7

Vba code to populate cells based on textbox value

  1. #1
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,038

    Vba code to populate cells based on textbox value

    Hi All

    I have the below code which populates a copy of a template sheet called Invoice. It works perfectly. Only problem I have is that the items captured are in random orders. What I want to achieve is to split the way it populates based on a textbox value. Invoice is currrent outcome and New Invoice is the result I want to achieve.

    Please Login or Register  to view this content.

    Somewhere, i need to add a If statement that checks the following:
    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: Vba code to populate cells based on textbox value

    There is no userform in your supplied example

  3. #3
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,038

    Re: Vba code to populate cells based on textbox value

    Hi Dave

    Thanks for input. Have attached with a snapshot of UserForm. Will this help?
    Attached Files Attached Files

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

    Re: Vba code to populate cells based on textbox value

    Why not include the userform in your sample? It's difficult to test your code on a picture.

  5. #5
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,038

    Re: Vba code to populate cells based on textbox value

    Hi Dave

    I have attached my workbook. Am new to VBA so am struggling slowly but surely to teach myself with the web and this helpful forum.
    Instructions as follows:

    1. Press 1 & waiter login
    2. Press New Table and enter Table no and No guests
    3. Press Beer & Choose Amstel
    4. Press 1 on Keypad and press capture
    5. Press Breakfast & Choose Muesli
    6. Press 1 on Keypad and press capture
    7. Press Close Table

    Then Unhide Table opened and see result. This is current. I want to change my code to allow for the split of Food and beverages as previously explained. Hope this makes sense.
    Attached Files Attached Files

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,038

    Re: Vba code to populate cells based on textbox value

    Anyone able to assist

  7. #7
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,038

    Re: Vba code to populate cells based on textbox value

    Hi All

    I am still trying to find a solution to my problem. Anyone out there care to have a look and see if they can assist

+ 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] Auto populate textbox value based on combobox value
    By justin1202 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-30-2015, 04:01 AM
  2. [SOLVED] trying to populate a list box based on textbox value
    By justlearning123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-08-2015, 08:41 PM
  3. Textbox to populate based on combobox selection
    By acroley1 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-11-2015, 04:12 PM
  4. [SOLVED] Need to populate data in listbox based on textbox value change
    By Naveed Raza in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-20-2014, 07:10 AM
  5. Populate textbox based off ComboBox Selection
    By ladams41 in forum Excel General
    Replies: 1
    Last Post: 04-09-2014, 10:13 AM
  6. Populate TextBox based off ComboBox selection
    By ladams41 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2014, 01:24 PM
  7. Populate a column based on input from a textbox
    By AnthonyWB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2012, 03:39 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