Solved

Why doesn't my Excel VBA listbox populate the User form fields ?

Posted on 2014-03-12
2
636 Views
Last Modified: 2014-03-12
Hi,

I have an Excel 2010 User form made up of Active X controls (text boxes and a listbox).

The listbox displays an abbreviated list of all the rows on the sheet. On opening the form the most recent record (that is, the record that appears at the bottom of the list in the list box) is displayed in the form fields.
 
The user can click on any record in the list box and the relevant sheet row populates the form fields.

To do this, my VBA procedure transfers the sheet data into an array and then subsequently populates the relevant text box controls and the listbox from the array.

However, if a sheet cell contained a string of more than 255 characters the application crashed. The application has now been modified to cope with this problem by using a single column MATCH function. On opening the user form the field now displays the string of more than 255 characters correctly.

But there is still a problem. If you select another record in the list box and THEN select the most recent record again from the list box, nothing happens. The most recent record is ignored.

I'm at a loss as to why this record doesn't display, other than it contains a field with more than 255 characters.

The application is attached. Click on the 'CONTRACTS' button on the sheet. The procedure in question is liContracts_Click()

Any help would be appreciated.

Regards
Toco
Contracts3.xlsm
0
Comment
Question by:Tocogroup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39923175
HI,

Do you mean that if you click another contract and the return to contract 76 you cannot see the text in notes?
pls try this version

Regards
Contracts3v1.xlsm
0
 

Author Closing Comment

by:Tocogroup
ID: 39923765
Hah. You condensed my preamble into 20-odd words.
Many thanks
Toco
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question