Gimpster's code requires an API declaration.... add this to a module

Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Let us know if this is the wrong one, gimpster

Tom