Je cherche le moyen de charger un combobox à partir d'une colonne d'une feuille Excel.
Mes recherches, au mieux, m'ont permis d'avoir une valeur et non la totalité des valeurs. Pas trouvé non plus de la doc sur ce domaine...
J'ai tenté avec une array mais sans résultat
Je joints ce bout de code si ca peut être utile
Code : Tout sélectionner
#include <GUIConstants.au3>
#include <Excel.au3>
Local $oExcel = _ExcelBookNew() ;Create new book, make it visible
For $i = 1 To 5 ;Loop
_ExcelWriteCell($oExcel, $i, $i, 1) ;Write to the Cell
Next
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 207, 133, 193, 125)
$Button1 = GUICtrlCreateButton("OK", 120, 104, 73, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$ListContent1 = $oExcel.Activesheet.Range("A5").value
$ListContent = _ExcelReadCell($oExcel, 3, 1)
_ExcelBookClose($oExcel)
MsgBox(0,"",$ListContent1)
MsgBox(0,"",$ListContent)
$List1 = GUICtrlCreateCombo("", 8, 80, 145, 19)
GUICtrlSetData($List1, $ListContent1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$ListData = GUICtrlRead($List1)
MsgBox(64, "AutoIt3", $ListData)
EndSwitch
WEndWalkson


