The code executes, and quits when the loop is done, but the progress bar is not changed at all during that time. What do I need to change?Code:Dim $z = 1 While $z <= $var_z If GUIGetMsg() = $ctrl_cancel OR GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop EndIf If $z = $var_z Then Exit EndIf GUICtrlSetData($ctrl_progress, Int($z/$var_z)) $z = $z+1 Sleep(1000) WEnd