Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get value from listbox

Status
Not open for further replies.

matrixknow

IS-IT--Management
May 3, 2007
78
Hola,

I get the index value form the selected item form my listbox. eg 9.
I should get the literal value of the second column and the
literal value of th fourth column which is not visible (with 0 cm). This is not working.

Code:
   Dim strFileName As String
   Dim frm As Form
   Set frm = Forms!F_DAG
      If frmDag!lstShow.ItemsSelected.Count > 0 Then
         Dim intColumns As Integer
         intColumns = frmDag!lstShow.ColumnCount
         MsgBox intColumns = ok
         MsgBox frmDag!lstShow.Value = 9 is not the literal value but the index
      End If
   
   strFileName = [Forms]![F_DAG]![lstShow].Column(4) = not working
 
sorry friends, easy problem, I found it while reading some issues on comboboxes on the internet.

The Column index is zero bases. This works

Code:
strFileName = [Forms]![F_DAG]![lstShow].Column(3)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top