Hallo Leute!
Ich brauche wiedermal eure Hilfe.
Eigentlich sollte man in diesem Case einige Nummern in Input boxen schreiben können, welche dann in einem Array abgespeichert werden.
Leider speichert es nur $NumArrayInput[$o] nicht $NumArrayInput[0-$o]
Case $MoreNumbers
GUICtrlSetData($MoreNumbers,"GUI verstecken")
$o=GUICtrlRead($Combo)
$Form1 = GUICreate("Nummern", 177, 20*$o+50, 201, 126,$WS_POPUP,$WS_EX_MDICHILD,$Parent)
$Group1 = GUICtrlCreateGroup("Nummern", 8, 8, 161, 20*$o+35)
For $i = 1 To $o
Dim $NumArray[55]
Dim $NumArrayInput[55]
$NumArray[$i] = GUICtrlCreateLabel("Nummer " & $i & ": ", 15, 20 + $i * 20, 58, 20)
$NumArrayInput[$i] = GUICtrlCreateInput("120", 80, 17 + $i * 20, 65, 20)
$NumArrayInput[$i]= GUICtrlRead($NumArrayInput[$i])
MsgBox(0,"j",$NumArrayInput[$i]) ;zeigt jeweils pro input box "120" an
Next
GUISetState(@SW_SHOW,$Form1)
$close = 0
While $close = 0
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $MoreNumbers
GUISetState(@SW_HIDE,$Form1)
$close = 1
GUICtrlSetData($MoreNumbers,"Mehr Nummern eingeben")
Case $OeffnenN
_ArrayDisplay($NumArrayInput) ;Zeigt nur "120" an bei der Linie Nummer $o
$o=GUICtrlRead($Combo)
$oExcel = _ExcelBookOpen("S:\blabla\telefonapparat_bak.xls")
$y=1
For $i = 1 To $o
$Nr2 = StringTrimLeft($NumArrayInput[$i], 1)
$Nr3 = StringTrimRight($NumArrayInput[$i], 2)
_ExcelWriteCell($oExcel,$NumArrayInput[$i], $y, 1)
_ExcelWriteCell($oExcel,"058 477 4" & $Nr3 & " " & $Nr2, $y + 1, 1)
MsgBox(0,"j",$NumArrayInput[$i])
$y=$y+2
Next
Case $AusdruckenN
_ExcelPrintRange($oExcel, 1, 1, 2, 1,1, "", False, False,"")
EndSwitch
WEnd
EndSwitch
Vielen Dank