With respect - the suggested changes are not correct. Parameters which are Window Handles must use the LONGPTR variable type, otherwise results from the Function could be incorrect.
I'm not going to explain - it's something the OP needs to understand rather than blindly using code that potentially could crash Excel: https://msdn.microsoft.com/en-us/lib.../gg264421.aspx
Bookmarks