+ Reply to Thread
Results 1 to 5 of 5

Help on couple userform with vba codes

  1. #1
    Banned User!
    Join Date
    03-14-2016
    Location
    Oklahoma
    MS-Off Ver
    365 Home
    Posts
    56

    Help on couple userform with vba codes

    Userform 1
    is put data into worksheet
    Put in name in box than press Search button highlight person where is locate at on
    Worksheets. On form where say type put

    C for Cell
    H for Home
    F for Fax

    On worksheet where stay type will put

    Cell
    Home
    Fax
    Some reason it skip a line I not sure why skip


    Userform 2
    is to view what on worksheets type in a name than press Search button bring person data into form

    Give sample you type in first Name like "Thomas" press search bring all with same name some next one

    The picture is for userform1
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by sf49ers164480; 05-13-2019 at 07:40 PM.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Help on couple userform with vba codes

    For UserForm1 change this line:
    Please Login or Register  to view this content.
    For this:
    Please Login or Register  to view this content.
    The reason it skips is you have the first line of code above in the change event for a textbox. That textbox is cleared during the "resetForm" which fires the line of code again meaning you move down two rows from the active cell.
    The second line of code above is one way around this issue. There are many different ways of handling it.

    As for UserForm2, I'm not sure what you're asking as there is no code attached to the search button.
    Do you want code to recall data from the sheet to the form? If so, how would you handle two rows of data both with the name Thomas?

    BSB

  3. #3
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,295

    Re: Help on couple userform with vba codes

    Although I have difficulty understanding your wording I understand what you are trying to achieve.
    Experiment with the basics first, get the coding right, then produce the 'pretty' sheets and UserForms.
    Work your way through the structures of other peoples contributions to get an insight.
    There are many ways of achieving the same result, programmers develop their own preferences of approach.
    Look at the attached link and also 'sintek' link within that post, same problem solved by different approaches.
    Happy coding
    torachan.

  4. #4
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: Help on couple userform with vba codes

    This should give you a start.
    Why using 2 forms (less is more)
    Attached Files Attached Files
    Click the * Add Reputation below to say thanks.

  5. #5
    Banned User!
    Join Date
    03-14-2016
    Location
    Oklahoma
    MS-Off Ver
    365 Home
    Posts
    56
    Quote Originally Posted by dotchiejack View Post
    This should give you a start.
    Why using 2 forms (less is more)
    Seond form is to bring data from worksheet into from

    And show a friend bring to into from meqn
    Last edited by sf49ers164480; 05-14-2019 at 09:32 AM.

+ 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. Codes in userform no longer working
    By chrisellis250 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-16-2017, 03:43 PM
  2. [SOLVED] Want to design a userform And codes
    By mak_pj in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-29-2016, 04:52 AM
  3. Couple of Userform, Change event queries
    By welshman010 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2014, 08:46 PM
  4. [SOLVED] Correction of a couple of macro codes
    By aaaaaaiden in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2014, 06:08 AM
  5. Image on userform codes
    By Mehmet82 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-27-2013, 08:22 AM
  6. couple userform questions
    By Gary Keramidas in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-20-2006, 07:15 AM
  7. Can't run codes linked with Userform
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-07-2005, 01:26 AM

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