Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-08-2014, 11:50 AM
whatsup whatsup is offline This is a Userform LIstbox queston: A variable does not set to the value of a listbox Windows 7 64bit This is a Userform LIstbox queston: A variable does not set to the value of a listbox Office 2010 32bit
Competent Performer
 
Join Date: May 2014
Posts: 137
whatsup will become famous soon enough
Default

In your example my code as posted worked fine, but in the UserForm were shown the set values. You see from this, your code walks on thin ice.

Quote:
...I have appended ".value" to each of the code lines above and that worked pefectly
The default property of a ListBox is .value, so you haven't actually changed anything. As you can see in my last posting, I tried this as well, but the problem remained therefore I tried the .List-property. What I want to say: Your new code will probably have some trouble soon again

It is generally adviseable to use the especific property:
Code:
Uf_CertPlan_Owner.Tb_TotalQTY.Text = Sheet18.Cells(C1, 2).Value
Uf_CertPlan_Owner.Lb_TeamPerformance.Value = Sheet18.Cells(C1, 3).Value
Uf_CertPlan_Owner.Lb_ProgramPlan.Value = Sheet18.Cells(C1, 4).Value
Uf_CertPlan_Owner.Lb_SowMaturity.Value = Sheet18.Cells(C1, 5).Value
... that also makes clear - when reading the script - that a TextBox contains text though the contains might be numeric. An important thing to keep in mind when using contains of a TextBox.

Edit:
Haven't yet seen your new post, you will have to change "Sub ReloadCertPlanOwner()" and probably sa well the calls to Show the next UserForm...
Reply With Quote
  #2  
Old 08-08-2014, 12:00 PM
CatMan CatMan is offline This is a Userform LIstbox queston: A variable does not set to the value of a listbox Windows 7 32bit This is a Userform LIstbox queston: A variable does not set to the value of a listbox Office 2010 32bit
Intermediate
This is a Userform LIstbox queston: A variable does not set to the value of a listbox
 
Join Date: Apr 2012
Posts: 39
CatMan is on a distinguished road
Default

Hi Whatsup, ok, I tried your latest suggestion but no improvement. I checked that the worksheet cell includes the text string "High" and it does so I don't think that is the problem.
Reply With Quote
  #3  
Old 08-08-2014, 12:15 PM
whatsup whatsup is offline This is a Userform LIstbox queston: A variable does not set to the value of a listbox Windows 7 64bit This is a Userform LIstbox queston: A variable does not set to the value of a listbox Office 2010 32bit
Competent Performer
 
Join Date: May 2014
Posts: 137
whatsup will become famous soon enough
Default

As I said in "Edit" you probably will have to change the calls to display the Uf_CertPlan_Owner,

A question: Do you use the Sub ReloadCertPlanOwner() on other occasions as well, or is it only used from Uf_AirplaneCertSubCat?
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
This is a Userform LIstbox queston: A variable does not set to the value of a listbox Moving Selected Items from a Multiselect Listbox on a userform to a bookmark in Word marksm33 Word VBA 3 01-15-2015 07:55 PM
This is a Userform LIstbox queston: A variable does not set to the value of a listbox This is a Userform LIstbox queston: A variable does not set to the value of a listbox CatMan Excel 1 08-08-2014 09:41 AM
Checkboxes are unchecked in Listbox that were checked off before.How can I stop this? Rochelle711 Excel Programming 0 06-22-2014 06:16 PM
This is a Userform LIstbox queston: A variable does not set to the value of a listbox Multi-select listbox help gvibe@hotmail.com Word VBA 1 07-19-2013 10:54 AM
as the return value of another column, using Listbox? marreco Excel Programming 1 03-27-2012 12:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft