je recherche depuis un moment comment avoir dans une ma fenêtre "Form2" de mon script si dessous un chiffre qui depend d'une cellule (F2) dans mon fichier excel nommé Essai le soucis c'est que j'aimerai qu'elle change en temps réel si la cellule F2 change de valeur
merci d'avance de votre aide
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Excel.au3>
Global $idComboBox
Global Const $xlDown = -4121
Global $Form1
If FileExists(@DesktopDir & "\Essai.xlsx") = 0 Then Exit MsgBox(0, "Error", "dossier inexistant")
Local $oExcel = _Excel_Open(False)
Local $oBook = _Excel_BookOpen($oExcel, @DesktopDir & "\Essai.xlsx")
$Form1 = GUICreate("Inventaire ", 450, 288, 385, 350)
GUICtrlCreateLabel("Nom Du Mainteneur", 20, 15, 433, 33)
$idComboBox = GUICtrlCreateCombo("Odeolis", 140, 50, 135, 20)
GUICtrlSetData($idComboBox, "Effage|LABBE", "Effage")
GUISetState(@SW_SHOW)
$Form2 = GUICreate("Saisie", 450, 288, 385, 350)
$Button4 = GUICtrlCreateLabel("Saisir les Informations Produit ", 20, 15, 433, 33, $WS_GROUP)
GUICtrlSetFont(-1, 18, 100, 0, "MS Sans Serif")
GUICtrlCreateLabel('N°De Serie', 20, 83, 305, 105)
$Nserie = GUICtrlCreateInput("", 140, 80, 137, 21)
HotKeySet("{ENTER}", "_excel")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_Excel_BookSave($oBook)
_Excel_Close($oExcel)
Exit
Case $idComboBox
$sComboRead = GUICtrlRead($idComboBox)
GUISetState(@SW_HIDE, $Form1)
GUISetState(@SW_SHOW, $Form2)
Case $Nserie
EndSwitch
WEnd
Func _excel()
$value = GUICtrlRead($Nserie)
If $value = "" Then
MsgBox(0, "Erreur", 'pas de données')
Return SetError(1)
EndIf
$oExcel.Sheets(1).Select
$oExcel.Range("B1").Select
$oExcel.Selection.End($xlDown).Select
$oExcel.ActiveCell.Offset(1, 0).Select
$oExcel.ActiveCell.Value = $value
GUICtrlSetData($Nserie, "")
EndFunc ;==>_excel