Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello, Can someone tell me how I can take the value selected from a listbox
and place it in a particular worksheet cell? Upon activating "Sheet4" in the file, I have a userform, which contains a listbox (lstTeamNumbers), presented. On the userform, upon "clicking" the cmdTeam control, I have the following: lstTeamNumbers.Value = Range("bb1").Value frmTeamQuery.Hide After the code executes, there is no value populated in cell "bb1". Any and All Help Will Be Appreciated |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are setting the value of the list box to whatever is in
Range("bb1").Value on the active sheet. If I understand you correctly you want it the other way around... Range("bb1").Value = lstTeamNumbers.Value -- HTH... Jim Thomlinson "MWS" wrote: Hello, Can someone tell me how I can take the value selected from a listbox and place it in a particular worksheet cell? Upon activating "Sheet4" in the file, I have a userform, which contains a listbox (lstTeamNumbers), presented. On the userform, upon "clicking" the cmdTeam control, I have the following: lstTeamNumbers.Value = Range("bb1").Value frmTeamQuery.Hide After the code executes, there is no value populated in cell "bb1". Any and All Help Will Be Appreciated |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank You Jim - WOW I Must Need A Break (LOL)
"Jim Thomlinson" wrote: You are setting the value of the list box to whatever is in Range("bb1").Value on the active sheet. If I understand you correctly you want it the other way around... Range("bb1").Value = lstTeamNumbers.Value -- HTH... Jim Thomlinson "MWS" wrote: Hello, Can someone tell me how I can take the value selected from a listbox and place it in a particular worksheet cell? Upon activating "Sheet4" in the file, I have a userform, which contains a listbox (lstTeamNumbers), presented. On the userform, upon "clicking" the cmdTeam control, I have the following: lstTeamNumbers.Value = Range("bb1").Value frmTeamQuery.Hide After the code executes, there is no value populated in cell "bb1". Any and All Help Will Be Appreciated |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I had a nickel for each time I have pondered the obvious for an eternity...
-- HTH... Jim Thomlinson "MWS" wrote: Thank You Jim - WOW I Must Need A Break (LOL) "Jim Thomlinson" wrote: You are setting the value of the list box to whatever is in Range("bb1").Value on the active sheet. If I understand you correctly you want it the other way around... Range("bb1").Value = lstTeamNumbers.Value -- HTH... Jim Thomlinson "MWS" wrote: Hello, Can someone tell me how I can take the value selected from a listbox and place it in a particular worksheet cell? Upon activating "Sheet4" in the file, I have a userform, which contains a listbox (lstTeamNumbers), presented. On the userform, upon "clicking" the cmdTeam control, I have the following: lstTeamNumbers.Value = Range("bb1").Value frmTeamQuery.Hide After the code executes, there is no value populated in cell "bb1". Any and All Help Will Be Appreciated |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Worksheets("blabla").Range("Target").Value = ListboxName.Text
|
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I did not go that far as to specify the sheet only because the MWS indicated
that the form is shown based on the sheet activate event. Since I did not specify the sheet name the active sheet (the one just activated) would be used by default. That being said when in doubt it is better to be explicit as you have in your code. -- HTH... Jim Thomlinson "KD" wrote: Worksheets("blabla").Range("Target").Value = ListboxName.Text |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Look up and match Vendor name in one cell of worksheet from list ofmultiple Vendor names in column of other worksheet | Excel Worksheet Functions | |||
Print a worksheet repeatedly with each list cell | Excel Discussion (Misc queries) | |||
Lookup cell value using list of worksheet names | Excel Worksheet Functions | |||
If cell is checked, then list ondifferent worksheet | Excel Programming | |||
cell validation list reference to a different worksheet | Excel Programming |