Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 5 of 5

Thread: Populate userform with data from Excel worksheet and be able to amend the data

  1. #1
    Join Date
    30th March 2011
    Posts
    4

    Populate userform with data from Excel worksheet and be able to amend the data

    Hi guys,

    I'm a newbie on here and new to VBA. I have been asked to develop a userform to collect data and save it to an excel spreadsheet - which i have managed to do.

    I now need to add functionality to the userform to search for specific data range in a column on the worksheet and pull into the userform any related data which has been previously populated via the userform.

    I.e - user partially completes the form and saves the data to a worksheet.
    When the user reopens the userform and selects (listbox of relevant values) or types in the data string they are looking for, the form automatically pulls in all the data that belong to that record set.

    The user can then complete more fields on the form and any changes/updates are saved to the excel worksheet.

    I have managed to find bits of code that do different things, but I am struggling to associate the recordset based on the criteria the user enters via keying in or selecting from the listbox.

    I feel like I am going round in circles with this and hence the request for help.

    Any ideas/suggestions greatfully received

    TIA
    Paul

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    10th August 2005
    Posts
    844

    Re: Populate userform with data from Excel worksheet and be able to amend the data

    Without a sample sheet it's hard to say where exactly you are stuck as it sounds like you have most of the functionality.

    I'm guessing the listbox/pulldown on the form the user chooses from is a key/unique field in the data? If so, then you seem to know how to find the row of relevant data (you reference to the recordset) so it's just a matter of reading in the data that exists into the text boxes on the user form. When the user is done, the "Done"/"Okay" button (or whatever) is used to capture the data from the form and write it back to the worksheet using the previously captured row as a reference.

    So what part aren't you able to get working? Do you have a sample worksheet - scrub all relevant data before posting.

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    30th March 2011
    Posts
    4

    Re: Populate userform with data from Excel worksheet and be able to amend the data

    I think I have sussed it!!!
    the data is now pulling through as I want.

    But... I have included the following and cannot see excel to turn it off. I also omitted to include the bit of code to close excel when the form closed. Any suggestions?

    Application.Visible = False I said I was new to VBA :-)

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    29th July 2013
    Posts
    1

    Re: Populate userform with data from Excel worksheet and be able to amend the data

    Hello Rimmads, I was facing the same issue with no help... can you pls help me with the code's or any reference. Regards, Souma.
    Quote Originally Posted by Rimmads View Post
    I think I have sussed it!!!
    the data is now pulling through as I want.

    But... I have included the following and cannot see excel to turn it off. I also omitted to include the bit of code to close excel when the form closed. Any suggestions?

    Application.Visible = False I said I was new to VBA :-)

    Excel Video Tutorials / Excel Dashboards Reports


  5. #5
    Join Date
    26th January 2003
    Location
    Derbyshire,UK
    Posts
    18,508

    Re: Populate userform with data from Excel worksheet and be able to amend the data

    Souma

    Please start your own Thread.
    Hope that Helps

    Roy

    For free Excel tools & articles visit my web site

    If I have helped you and you feel like putting your hand in your pocket please make a donation to Children in Need

    RoyUK's Web Site

    royUK's Database Form

    Where to paste code from the Forum

    About me.

Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Replies: 3
    Last Post: August 16th, 2012, 23:28
  2. Populate UserForm ComboBox With Worksheet Table Data
    By Xjoutsider in forum EXCEL HELP
    Replies: 2
    Last Post: April 19th, 2010, 21:09
  3. Find & Amend/Edit Data Via Userform
    By Tiny in forum EXCEL HELP
    Replies: 11
    Last Post: April 17th, 2008, 08:30
  4. Populate Userform With Data From Worksheet
    By nu@this in forum EXCEL HELP
    Replies: 3
    Last Post: August 2nd, 2007, 02:06
  5. Populate UserForm Controls With Worksheet Data
    By jimapos in forum EXCEL HELP
    Replies: 2
    Last Post: September 28th, 2006, 10:35

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
  •  
porno