Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform listbox cannot get listbox.value to transfer back to main sub
hi
when i insert listboxes into a userform, the listbox.values that i select aren't accessible back in my main program. i thought that if i clicked on the listbox and then just hit the commandbutton, the value that i clicked would be accessible back in my subroutine, but it's not. what code am i missing in my userform code? thanx sam sub XX () dim myform as new userform myform show activecell.value = listbox1.value end sub (actual userform code below) Private Sub cmdend_Click() Hide End Sub Private Sub ListBox1_Click() End Sub Private Sub UserForm_Initialize() ListBox1.AddItem "Hosp Vist Mod" ListBox1.AddItem "Hosp Vist Complex" ListBox1.AddItem "Hosp Consult Mod" ListBox1.AddItem "Hosp Consult Complex" ListBox1.AddItem "Hosp Admission" ListBox1.AddItem "H&P" ListBox2.AddItem "30 minutes ICU detention time" ListBox2.AddItem "inpt echocardiogram interp." ListBox2.AddItem "inpt holter interp." ListBox2.AddItem "inpt right heart cath only" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
DONT WANT TO SEE LISTBOX SELEXTED ITEMS WHEN COME BACK TO LIST BOX | Excel Discussion (Misc queries) | |||
VBA: Creating listbox similar to the one in Pivot table (Listbox+Checkbox) | Excel Programming | |||
transfer data in listbox | Excel Programming | |||
Transfer multiple columns items form listbox to range | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming |