Declare Function GetFocus Lib "user32" () As Long Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long Declare Function TextOut Lib "gdi32" _ Alias "TextOutA" (ByVal hDC As Long, _ ByVal x As Long, ByVal y As Long, _ ByVal lpString As String, ByVal nCount As Long) As Long Public Sub WriteText(x As Long, y As Long, sText As String, Optional hWnd As Long) 'Write text anywhere on the screen Dim hDC As Long Dim lReturn As Long If hWnd = 0 Then hWnd = GetFocus hDC = GetDC(hWnd) lReturn = TextOut(hDC, x, y, sText, Len(sText)) End Sub