LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Setting a list box to a value

I have 2 user forms that talk to each other. The first one has a
listbox that gets a list of values added from a range off of a sheet.
It is a list of suppleirs. The second user form looks up a RFQ# and
then I hit a command button to create a revision of the displayed RFQ
on Userform2. I set listboxes on userform1 equal to text boxes on
userform 2. My thought was that userform1 would have the complete list
of suppliers and then by setting userform1's listbox value equal to the
userform2 text box it would pre-select it on the list.

This works most of the time but I have 2-3 listboxes on userform1 that
show a selection has been made but when I check the value for that
listbox it comes back with "". The list box on userform1 is visible,
not locked, enabled. The real puzzler is that this glitch seems to move
around on 2-3 of my listboxes. It does not always happen the same
everytime.
I clicked on each of the listboxes on userform1 and looked at the
properties as compared to one that never gives me a problem. The only
difference I saw was that MatchEntry was not set the same. So I made
the trouble on match the good one with the Complete entry match
selection. I also tried a mix of listbox.value and .text to see if
that made a difference. No such luck.

'Load the current RFQ data onto the USERFORM1
UserForm1.ListBox1.Value = UserForm3.TextBox7.Text
UserForm1.ListBox2.Value = UserForm3.TextBox8.Text
UserForm1.ListBox3.Text = UserForm3.TextBox9.Value '.Text 'Product
Type
UserForm1.ListBox4.Text = UserForm3.TextBox11.Text
UserForm1.ListBox5.Text = UserForm3.TextBox10.Value '.Text
UserForm1.TextBox1.Text = UserForm3.TextBox1.Text
UserForm1.TextBox2.Text = UserForm3.TextBox2.Text
UserForm1.TextBox3.Text = UserForm3.TextBox3.Text
UserForm1.TextBox5.Text = UserForm3.TextBox5.Text
UserForm1.TextBox6.Text = UserForm3.TextBox6.Text
UserForm1.TextBox7.Text = UserForm3.TextBox13.Text

Any thoughts??

Thanks
Scott

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Validation "List" - Setting length of list shown Dave Excel Discussion (Misc queries) 3 January 31st 08 06:51 PM
Setting up a price list G4 Excel Worksheet Functions 4 February 10th 06 10:16 PM
Setting up a List Box maj chuck Excel Programming 2 June 17th 05 06:48 PM
Setting up a random list from long list of names ? yorkshire exile Excel Discussion (Misc queries) 4 January 6th 05 01:44 PM
Setting list box contents P Dudesek Excel Programming 5 November 28th 03 04:45 PM


All times are GMT +1. The time now is 08:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"