Link to home
Start Free TrialLog in
Avatar of Mike Eghtebas
Mike EghtebasFlag for United States of America

asked on

How to get lstWs.Comlumn(1) value...

   For i = 1 To Forms!fFiles!lstWs.ListCount - 1
        If Forms!fFiles!lstWs.Selected(i) = True Then   '<--- if selected
            Debug.Print Forms!fFiles!lstWs.ItemData(i) '<-- this gives the value of 1st column ok.
            Debug.Print Forms!fFiles!lstWs.Column(1).Column(1) '<-- this fails
        End If
    Next i

Question: What is right syntax for

Debug.Print Forms!fFiles!lstWs.Column(1).Column(1)

Thank you.
Avatar of tbsgadi
tbsgadi
Flag of Israel image

Hi eghtebas,

Maybe Debug.Print Forms!fFiles!lstWs.Column(1)
Depends waht you want to see.


Gary
SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike Eghtebas

ASKER

Hi Gary,

I want to see the second column of the for the selected row (item)

No      Name
1          A
2          B    '<-- if this row is selected,  Forms!fFiles!lstWs.Selected(i) = True
3         C

Then I want th value of B.

Hi LSMConsulting,

But I am not able to get the right value yet. Maybe becuase it is 5 am here.

Forms!fFiles!stWs.Column(i, 0)    gives me null
Forms!fFiles!stWs.Column(i, 1)    also gives me null

Mike


it should be the other way around

Forms!fFiles!stWs.Column(0,i)    
Forms!fFiles!stWs.Column(1,i)    
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial