lorenzoviva
Messages postés18Date d'inscriptionvendredi 12 octobre 2007StatutMembreDernière intervention26 octobre 2008
-
26 oct. 2008 à 17:32
malo777
Messages postés88Date d'inscriptionjeudi 21 avril 2005StatutMembreDernière intervention13 juin 2013
-
15 avril 2011 à 16:07
salut
desole encore une question
j'arrive a sauvgarder des items d'une listbox avec une SaveFileDialog
mais j'arrive pas a la "loader" dans une autre form
help plz
merci d'avance
lorenzo
Public Sub
LoadLstCboFromFile(
ByRef
oObj
As Object
, sPath
As String
,
Optional
bClear
As Boolean
=
True
)
' oObj doit être une ListBox ou un ComboBox n'étant pas en lecture seule
Dim FF As Integer, sLine As String
FF = FreeFile
If bClear Then oObj.Clear
If LenB(Dir(sPath, vbSystem Or vbHidden)) > 0 Then
Open sPath For Input As #FF
Do Until EOF(FF)
Line Input #FF, sLine
If LenB(sLine) > 0 Then oObj.AddItem sLine
Loop
Close #FF
End If
End Sub
Public Sub SaveLstCboToFile(ByRef oObj As Object, sPath As String)
' oObj doit être une ListBox ou un ComboBox
Dim FF As Integer, i As Integer
FF = FreeFile
Open sPath For Output As #FF
For i = 0 To oObj.ListCount - 1
Print #FF, oObj.List(i)
Next
Close #FF
End Sub
++
<hr size="2" width="100%" />
Prenez un instant pour répondre à [sujet-SONDAGE-POP3-POUR-CS_769706.aspx ce sondage] svp