+ Reply to Thread
Results 1 to 6 of 6

populate textboxes from listbox dblClick

  1. #1
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    populate textboxes from listbox dblClick

    Hi

    I have a listbox "CPClst_1" which retrieves 65 column entries from a chosen name clicked upon

    The same userform has textboxes CPCtxt_3 through to CPCtxt_10

    I am trying to populate the textboxes with the data from columns 58 through 65 ( CPCtxt_2 needs to be Column1 but thats for later)

    The data is a mixture of texts, numbers and data.

    I cant seem to get the return I need...this is what I have tried

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: populate textboxes from listbox dblClick

    Assuming the ListBox is on a userform
    Please Login or Register  to view this content.
    Why do you loop
    Please Login or Register  to view this content.
    if you are only interested in values > 57?

    You can loop
    Please Login or Register  to view this content.

  3. #3
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: populate textboxes from listbox dblClick

    Listbox is on the same userform "CPClst_1"

    I have checked the number of listbox columns and correct, now looking at at anamolies in data but this amended code still doesnt return any values

    Please Login or Register  to view this content.
    The data is all date values except the first column so I moved code along a column to 59 to start populating at CPCtxt_4, but still no go.

    Workbook attached. Userform is Update button from main menu
    Last edited by nigelog; 02-24-2017 at 08:04 AM.

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: populate textboxes from listbox dblClick

    I can't really check this out (phone) - but it looks like you're reading up to column 65 from the listbox

    Please Login or Register  to view this content.
    Do you really have 65 columns in the ListBox??

    If not then that should error rather than simply "doesnt return any values"

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: populate textboxes from listbox dblClick

    Hi,

    The index starts at 0 so you should be using
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  6. #6
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: populate textboxes from listbox dblClick

    @cytop - yes unfortunately 65 columns

    @ xknitwit - spot on thankyou....

+ 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. [SOLVED] DblClick event on listbox crashes Excel when I move the listbox as a result of the event
    By feanturi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-22-2022, 11:38 AM
  2. [SOLVED] Populate worksheet textboxes from listbox
    By rodgersmg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2015, 01:25 AM
  3. [SOLVED] Populate textboxes from listbox.click
    By wingnut74 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-30-2013, 05:07 PM
  4. [SOLVED] Populate textboxes from listbox item cellrow to modifie cellvalue and send it back to exce
    By prohmex in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-18-2013, 06:43 PM
  5. Editing listbox items in Dblclick event freezes Excel unless mouse moves over listbox
    By muneebmansoor in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-28-2013, 02:21 PM
  6. Userform populate listbox with search from multiple textboxes
    By chendysworld in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-12-2012, 11:12 AM
  7. [SOLVED] Populate listbox columns with entries from textboxes on userform
    By AndyE in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2012, 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