Thanks. Worked. Had to fix to code(or else i get a number):
Is there a way to get hwnd to the active window? The method you showed works fine, but if the mouse isnt over the program I won't get the hwnd to that window. I am using hWnd in Userform_Initialize.Code:Dim strData As String strData = Space(128)




Reply With Quote