VB to move text from one list box to another?

  livewire 15:06 07 May 08
Locked

I cant figure out for the life of me why this doesn't work...

It seems to work ok in VB6 but when I put it into Access 2007 VBA it comes up with some ridiculous error message.

Anyone got any idea what could be the problem here? Its been puzzling me for a while now!!

click here

^^ for screenshot :(

  VoG II 16:17 07 May 08

Untested but have you tried

lst2.AddItem lst1.List(lst1.Value)

  livewire 09:58 15 May 08

Hi VoG

Indeed! .AddItem and .Value are the way forward!

The winning code was:

Private Sub cmdMove_Click()
If lst1.ListIndex = -1 Then
Exit Sub
Else
lst2.AddItem (lst1.Value)
End If
End Sub

This thread is now locked and can not be replied to.

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

The updated 'Corel Painter inside Photoshop' plugin ParticleShop offers new brushes

Best running headphones | Best sport & fitness headphones: 4 brilliant pairs of wireless…