cs_JMO
Messages postés1854Date d'inscriptionjeudi 23 mai 2002StatutMembreDernière intervention24 juin 2018
-
29 nov. 2012 à 20:57
cs_JMO
Messages postés1854Date d'inscriptionjeudi 23 mai 2002StatutMembreDernière intervention24 juin 2018
-
30 nov. 2012 à 13:17
Bonsoir le Forum,
Je transforme un .vbs en application HTA.
Je rencontre plusieurs problèmes.
Conformément au Forum, chaque question sera distincte.
Question:
Dans le body, création d'une ListBox dynamique.
<SELECT NAME="lstClient">
</SELECT>
Dans ma "Sub Window_onLoad"
' Initialisation objet ArrayList
Set MyArrayList = CreateObject("System.Collections.ArrayList")
For i=2 To UBound(arrConfigLine)
strClient = Split(arrConfigLine(i), Chr(58))(0)
If InStr(1, strClient, "SAVEMUTU") = 0 Then MyArrayList.Add Trim(strClient)
Next
' Tri de la collection ArrayList
MyArrayList.Sort
MyArrayList.insert 0, "Choix du client VTOM" & Space(8)
' Création ListBox dynamique
For i=0 To MyArrayList.Count-1
Set objOption = Document.CreateElement("OPTION")
objOption.Text = MyArrayList(i)
objOption.Value = MyArrayList(i)
lstClient.Add(objOption)
Next
Dans un bouton
Sub btnRelaunchApp_OnClick
txtLog.Value = vbNullString
btnVTOM.Disabled = False
btnSAVEMUTU.Disabled = False
btnQuitApp.disabled = False
lstClient.Disabled = True
lstSAVEMUTU.Disabled = True
Call Window_onLoad
End Sub
Question:
Comment dans la sub "btnRelaunchApp_OnClick", repositionner à 0 l'index de ma ListBox "lstClient" ???