+ Reply to Thread
Results 1 to 3 of 3

Beginner User Form Help

  1. #1
    Registered User
    Join Date
    06-21-2022
    Location
    Sheffield
    MS-Off Ver
    365
    Posts
    2

    Beginner User Form Help

    Hello all, im new to VBA programming but im slowly getting there ive been struggling with an issues for a few days and online example code isnt helping me much.

    What i have is a user data form, the user enters all the values and clicks submit and these get added to a table in another worksheet, this is working fine although the code will need some tidying up. I have now added a search button which opens another userform, this for has a populated list of serials and a listbox. Id like the search function to collect all the rows from the table and show them to the user somewhow either populate a the list box. I will add all my code as it may offer clues.

    Main Form Code:

    Please Login or Register  to view this content.
    Search Form Code

    Please Login or Register  to view this content.


    Any help greatly appreciated.
    Attached Files Attached Files
    Last edited by jamesbarrett; 06-23-2022 at 04:50 PM.

  2. #2
    Forum Expert
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    3,191

    Re: Beginner User Form Help

    demo example attached - all data handling on one form
    declare your variables immediately after Option Explicit at head of code - variables are then available to each Sub (if declared in Sub they are restricted to that Sub)
    use default names for your form controls then you can loop through them and save many rows of code.
    to enter data first press 'Clear' then add data and press 'Add - the rest should be intuitive.
    Attached Files Attached Files
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  3. #3
    Registered User
    Join Date
    06-21-2022
    Location
    Sheffield
    MS-Off Ver
    365
    Posts
    2
    Quote Originally Posted by torachan View Post
    demo example attached - all data handling on one form
    declare your variables immediately after Option Explicit at head of code - variables are then available to each Sub (if declared in Sub they are restricted to that Sub)
    use default names for your form controls then you can loop through them and save many rows of code.
    to enter data first press 'Clear' then add data and press 'Add - the rest should be intuitive.
    great thank you very much, i will look at the code and report back how i get on.

+ 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. VBA code to open a user form if the user form is located in an addin?
    By bresman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-19-2019, 09:04 AM
  2. Upload inputs from a User Form repeatedly until the user clicks the red X on the Form
    By TheJimmyMcGill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2019, 05:46 PM
  3. How to help a beginner user?
    By Targaryen in forum The Water Cooler
    Replies: 10
    Last Post: 07-15-2017, 04:42 PM
  4. How to help a beginner user?
    By Targaryen in forum Excel General
    Replies: 7
    Last Post: 07-14-2017, 07:42 PM
  5. [SOLVED] VBA guide/template for a beginner, user form
    By Odowd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-28-2016, 05:43 PM
  6. [SOLVED] User Form to execute search and return all values to the user form for editing
    By allwrighty in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2013, 10:40 PM
  7. VBA Beginner: Help with Checkboxes on created User Form
    By MarianneR in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-12-2005, 11: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