Εμφάνιση ενός μόνο μηνύματος
  #3  
Παλιά 08-06-17, 21:03
kolekas Ο χρήστης kolekas δεν είναι συνδεδεμένος
Όνομα: βασιλης
Έκδοση λογισμικού Office: Ms-Office 2007
Γλώσσα λογισμικού Office: Ελληνική
 
Εγγραφή: 22-09-2015
Μηνύματα: 72
Προεπιλογή

καλησπέρα φίλε Σπύρο
το είδα από το τηλ. αυτό που έβαλες άλλα δεν είχα προλάβει να το κοιτάξω στο pc.
σε είπα οτι το listbox και textbox είναι σε userform.
o κώδικας που έχω ειναι αυτος
(Private Sub lstEmployee_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
'dim the variables
Dim i As Integer
On Error Resume Next
'find the selected list item
i = Me.lstEmployee.ListIndex
'add the values to the text boxes
Me.Emp1.Value = Me.lstEmployee.Column(0, i)
Me.Emp2.Value = Me.lstEmployee.Column(1, i)
Me.Emp3.Value = Me.lstEmployee.Column(2, i)
Me.Emp4.Value = Me.lstEmployee.Column(3, i)
Me.Emp5.Value = Me.lstEmployee.Column(4, i)
Me.Emp6.Value = Me.lstEmployee.Column(5, i)
Me.Emp7.Value = Me.lstEmployee.Column(6, i)
Me.Emp8.Value = Me.lstEmployee.Column(7, i)
Me.Emp9.Value = Me.lstEmployee.Column(8, i)
Me.Emp10.Value = Me.lstEmployee.Column(9, i)
Me.Emp11.Value = Me.lstEmployee.Column(10, i)
Me.Emp12.Value = Me.lstEmployee.Column(11, i)
Me.Emp13.Value = Me.lstEmployee.Column(12, i)
Me.Emp14.Value = Me.lstEmployee.Column(13, i)
Me.Emp15.Value = Me.lstEmployee.Column(14, i)
Me.Emp16.Value = Me.lstEmployee.Column(15, i)
Me.Emp17.Value = Me.lstEmployee.Column(16, i)
Me.Emp18.Value = Me.lstEmployee.Column(17, i)
Me.Emp19.Value = Me.lstEmployee.Column(18, i)
Me.Emp20.Value = Me.lstEmployee.Column(19, i)
Me.Emp21.Value = Me.lstEmployee.Column(20, i)
On Error GoTo 0
End Sub)
ευχαριστώ για άλλη μια φορά που ασχολισε .....
Απάντηση με παράθεση