Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually, I was being dumb, you don't need a v ariable, yopu could access
the control directly. Similalrly, if it multi-select, you could in Userform2 use Dim i As Long With UserForm1.ListBox1 For i = 0 To .ListCount - 1 If .Selected(i) Then MsgBox .Value End If Next i End With -- HTH Bob Phillips "Simon Shaw" <simonATsimonstoolsDOTcom wrote in message ... This doesn't work as he Listbox is a multiselect. I also want to be able to re-populate the listbox with the previous selection if the user opens the second userform again. Thanks "Bob Phillips" wrote: On the first userform, declare a public string Public myVal As String In the second, set it say on the Listbox click Userform1.myVal = Me.Listbox1.Value -- HTH Bob Phillips "Simon Shaw" <simonATsimonstoolsDOTcom wrote in message ... What is the best method of storing the selected results of a listbox? to a variable? I am calling a userform from another userform and I need to pass back the selections of a listbox to the first userform, not for display but rather for later processing. I have tried declaring a public variable as type ListBox, then tried Set PublicListBox = ListBox i get a type mismatch error, an ideas? Thanks Simon Shaw |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there an excel template for storing laboratory results | Excel Discussion (Misc queries) | |||
Storing Macro Results | Excel Worksheet Functions | |||
Filter the results of a list based on a previous vlookup against the same list | Excel Worksheet Functions | |||
How to Update filter criteria from list and storing the query to another worksheet | Excel Programming | |||
How can I list the results of my macro without overwritng previous results? | Excel Programming |