Solved

Each Item Selected in listbox

Posted on 2007-12-05
2
713 Views
Last Modified: 2013-11-28
I have a listbox that I want to cycle through.  When i cycle through I want to have the user input a value in an inputbox and perform an action.  

My question is that in order to do this I need data from an unbound column in the listbox.  Here is my code sor far:
Private Sub cmdReceiveItem_Click()
 
Dim varItm As Variant
Dim varReceieveAmount As Integer
 
For Each varItm In Me.lstParts.ItemsSelected
 MsgBox Me.lstParts.ItemData(varItm)'Works fine for each item selected
   'MsgBox Me.lstParts.Column(2) 'This just returns the last item selected
 
   varReceieveAmount = InputBox("How many items are you receiving for" & Chr(13) & "Part - " & Me.lstParts.Column(2) & " - " & Me.lstParts.Column(3) & "") ' This obviously has the same issue with only having data for the last item selected in listbox
   
Next
End Sub

Open in new window

0
Comment
Question by:Lasers07
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
Lasers07 earned 0 total points
ID: 20416457
ahh... nevermind.  I figured it out.

MsgBox Me.lstParts.Column(2, varItm)
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question