I'm trying to set up a mover form with 2 listboxes, each have 2 columns and an Add button.
Listbox1 has rowsourcetype of 6 and works like its supposed to.
When I run the form and click the Add button, I get an error:
'Function argument value, type, or count is invalid'
Here's the code in the click event of the add button:
THISFORM.List2.AddListItem(THISFORM.List1.Value)
THISFORM.List1.BoundColumn=2
THISFORM.List2.AddListItem(THISFORM.List1.value,Thisform.List2.ListIndex,2)
THISFORM.List1.RemoveItem(THISFORM.List1.ListIndex)
The first column moves, so I think the error is occurring when I try to move the second column.
If there is a better way to do this, please let me know.
Would using arrays as rowsourcetype be better?
Thanks
Listbox1 has rowsourcetype of 6 and works like its supposed to.
When I run the form and click the Add button, I get an error:
'Function argument value, type, or count is invalid'
Here's the code in the click event of the add button:
THISFORM.List2.AddListItem(THISFORM.List1.Value)
THISFORM.List1.BoundColumn=2
THISFORM.List2.AddListItem(THISFORM.List1.value,Thisform.List2.ListIndex,2)
THISFORM.List1.RemoveItem(THISFORM.List1.ListIndex)
The first column moves, so I think the error is occurring when I try to move the second column.
If there is a better way to do this, please let me know.
Would using arrays as rowsourcetype be better?
Thanks