+ Reply to Thread
Results 1 to 5 of 5

Search and insert values in sheet from user form

  1. #1
    Registered User
    Join Date
    10-06-2016
    Location
    india
    MS-Off Ver
    2007
    Posts
    32

    Search and insert values in sheet from user form

    Hi, I have created a form in which i have used some codes to get the student data from sheet1 and perform some operation and saved in sheet2, till this i have done, now i want to to save the userform data based on the roll number and month of the fees paid by the student in sheet3.

    I have attached my user form and sheet

    FETY.png

    The same concept i have used in my another workbook to copy the data from sheet to sheet with the below code.
    Please Login or Register  to view this content.
    many thank in advance.

    BR
    COOL SAB

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,158

    Re: Search and insert values in sheet from user form

    There are different ways, it all depends upon your preference, e.g.:
    Please Login or Register  to view this content.

    Edit:

    Version with your code:
    Please Login or Register  to view this content.
    Attached Images Attached Images
    Last edited by mjr veverka; 01-17-2018 at 10:13 AM.

  3. #3
    Registered User
    Join Date
    10-06-2016
    Location
    india
    MS-Off Ver
    2007
    Posts
    32

    Re: Search and insert values in sheet from user form

    hi porucha vevrku, i got some compile error, as i have change only sheet name and some values in user form which i have highlighted in the below image.
    please advise to how to proceed further, many thanks in advance.

    error.png

    BR
    Cool Sab

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,643

    Re: Search and insert values in sheet from user form

    Alter control names to actual ones.
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,158

    Re: Search and insert values in sheet from user form

    Quote Originally Posted by sabeelahmedks View Post
    ... i got some compile error, as i have change only sheet name and some values in user form ...
    1. You should use not the name of the sheet itself, but the constant that stores this name
    2. strID = "A1002" and strMonth = "May" are not numeric values but strings - not 'Val' function
    3. 'amount' (strAmount = "600") yes, this "can be" a numeric value, then Val(Me.TextBox2.Text) and change the declaration of this variable to 'Double' (i.e. Dim strAmount as Double)
    4. Try the example of jindon, it is extremely short
    Attached Images Attached Images
    Last edited by mjr veverka; 01-18-2018 at 05:43 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. User form to Search Data and Insert
    By magnum4u in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2017, 11:16 AM
  2. Using a user form to insert a new row
    By Maddie77 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-07-2016, 11:55 AM
  3. Create User form to perform search using multiple search criteria
    By cherias in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-29-2015, 06:16 AM
  4. [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
  5. Replies: 4
    Last Post: 03-21-2013, 10:02 AM
  6. how to use VBA to search and return search result in the user form
    By pearlynie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2013, 07:58 AM
  7. Search and create a register with values inserted into user input form
    By confused.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2010, 08:24 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