Private Type RECT Left As Long Top As Long Right As Long Bottom As LongEnd TypePrivate Declare Function GetClientRect Lib "user32" (ByVal hWnd As Long, _ lpRect As RECT) As Long' get the size of a window's internal area in pixelSub GetWindowClientSize(ByVal hWnd As Long, Width As Long, Height As Long) Dim rc As RECT GetClientRect hWnd, rc Width = rc.Right - rc.Left Height = rc.Bottom - rc.TopEnd Sub