+ Reply to Thread
Results 1 to 4 of 4

Edit listbox value and worksheet value

  1. #1
    Registered User
    Join Date
    02-13-2010
    Location
    West Midlands
    MS-Off Ver
    Excel 2010
    Posts
    15

    Edit listbox value and worksheet value

    Hi

    I currently have a userform (SPPR) with a listbox (ListBox1) which contains the data from a worksheet called "Log Sheet". The data is pulled in by VBA code as below

    Please Login or Register  to view this content.
    What I have tried to do is have it so that you can edit column 9 ( ListBox1.Column(8, ListBox1.ListIndex) ) of what you have double clicked on.

    What I have so far is

    This is the code for the double click on the listbox

    Please Login or Register  to view this content.
    This is the code that once the Userform1 opens theres a drop down box that uses a vlookup to enter a value into a caption box. I have a command button to confirm edit

    Please Login or Register  to view this content.
    This changes the value in the visible ListBox, but doesn't change the value in the worksheet "Log Sheet".

    Im stuck as to how to do this. Anyone got any ideas.

    Thanks in advance

    Mike

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Edit listbox value and worksheet value

    explicitly populate the cell in the log sheet

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Edit listbox value and worksheet value

    Mike

    Write the contents of the listbox back to the worksheet.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    02-13-2010
    Location
    West Midlands
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Edit listbox value and worksheet value

    Quote Originally Posted by Norie View Post
    Mike

    Write the contents of the listbox back to the worksheet.
    Please Login or Register  to view this content.
    Norie

    Thanks for that, works great. CHeers

+ 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. Select & edit items in a listbox in VBA
    By poppy in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-04-2014, 04:47 PM
  2. Edit values on Listbox
    By Rodas in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-30-2013, 10:46 PM
  3. VBA edit listbox items on userform
    By Hilton1982 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2013, 03:51 AM
  4. listbox view & edit
    By wegkruip in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2009, 07:38 AM
  5. [SOLVED] Edit Add Delete Listbox Records
    By mvillarr@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-10-2005, 06:58 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