AGsol, You need to look for the $LVN_COLUMNCLICK code within the WM_NOTIFY message. Add: GUIRegisterMsg($WM_NOTIFY, "_WM_NOTIFY")after the GUISetState(@SW_SHOW) line and then use this handler function: Func _WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam)
#forceref $hWnd, $iMsg, $wParam
Local $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
Switch HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
Case $ListView1_Handle
Switch DllStructGetData($tNMHDR, "Code")
Case $LVN_COLUMNCLICK ; A column was clicked
Local $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
Local $iCol = DllStructGetData($tInfo, "SubItem")
ConsoleWrite("Column clicked: " & $iCol & @CRLF)
EndSwitch
EndSwitch
Return $__LISTVIEWCONSTANT_GUI_RUNDEFMSG
EndFunc ;==>_WM_NOTIFYIf you are unsure about GUIRegisterMsg and Windows message handlers, I recommend the GUIRegisterMsg tutorial in the Wiki. Please ask if you have any questions. M23