+ Reply to Thread
Results 1 to 2 of 2

Transfer listbox and textbox data from userform to spreadsheet

  1. #1
    Registered User
    Join Date
    08-06-2014
    Location
    Oxfordshire, England
    MS-Off Ver
    Microsift Office Professional Plus 2010
    Posts
    2

    Transfer listbox and textbox data from userform to spreadsheet

    Hi All,

    I am really, really stuck - i hope someone can help me please. I have been tasked with creating a 'database' of project data (from two departments), in Excel using VBA with multiple Userforms. There are three spreadsheets 1) one with project data info on, 2) main spreadsheet that all userforms transfer their data too, 3) spreadsheet of all completed projects.

    I have so far through searching the internet and reading been able to create all userforms for entering and editing data. The userforms consist of TextBoxes and ListBoxes. I am able to transfer the TextBox data into the main spreadsheet when a 'save' button is clicked, but I cannot find the coding I need to transfer the text from the ListBox in the userform to the same row as the TextBox is going into. This is the coding I have for the TextBoxes to be taken across, saved and returned to the 'main menu'. The ListBoxes are in the code also, but do not go across. Listbox options are populated by 'With' codes and not RowSource. Can someone point me in the right direction please?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Transfer listbox and textbox data from userform to spreadsheet

    This must be very slow.

    if you had left thre textbox numbers as default ie textbox1, textbox2 etc.

    You could have read all the textboxes into an array example for 50 textboxes.

    Please Login or Register  to view this content.
    Then you could have written all the data to excel in one write operation.

    Please Login or Register  to view this content.

    With your setup you need to use code like this:-

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 09-05-2014 at 03:19 PM.

  3. #3
    Registered User
    Join Date
    08-06-2014
    Location
    Oxfordshire, England
    MS-Off Ver
    Microsift Office Professional Plus 2010
    Posts
    2

    Re: Transfer listbox and textbox data from userform to spreadsheet

    Ahhh, thank you Mehmetcik - I did not know or realise that. Maybe it will be easier to re-write this to how you have said. Thanks for your help.

+ 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. Get Data from UserForm (TextBox, ListBox) doesnt work
    By BorisMKD in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-15-2014, 05:07 AM
  2. Transfer Data From One Userform Listbox to Another Userform Listbox with 11 columns
    By sparkoft in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-18-2013, 10:54 AM
  3. Edit existing data in spreadsheet through userform textbox
    By MIFF3436 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-04-2012, 12:17 PM
  4. Find UserForm ComboBox Value (date) & Transfer TextBox Data To Same Row
    By okriskao in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2008, 11:33 AM
  5. Replies: 1
    Last Post: 05-17-2006, 04:50 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