Any ideas why this brings up a "Compile error- Argument not optional" error?

The Declares are:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hWnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String) As Long
Private Declare Function BringWindowToTop Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Private Const WM_SETTEXT = &HC


Problem code:

Private Sub Command3_Click()
Call PutTextIntoNotepad
End Sub

Private Sub PutTextIntoNotepad(hWnd As Long)

'This adds text to notepad, by locating its
''Edit' class window. This is similar to the
'method used to locate the hwnd itself, but
'here we know the parent (hWnd) so only
'have to search its child windows.

Dim hWndChild As Long
Dim sMsg As String
Dim sBuffer As String * 32
Dim nSize As Long

'this string is split only to fit the browser window
sMsg = "This method demonstrates using SendMessage()"


'get the first child window in Notepad
hWndChild = GetWindow(hWnd, GW_CHILD)

'hwndchild will = 0 when no more child windows are found
Do While hWndChild <> 0

'get the Class Name of the window
nSize = GetClassName(hWndChild, sBuffer, 32)

'if nSize > 0, it contains the length
'of the class name retrieved
If nSize Then

'if the class name is "Edit",
'set some text and exit
If Left$(sBuffer, nSize) = "Edit" Then

Call SendMessage(hWndChild, WM_SETTEXT, 0&, ByVal sMsg)
Exit Sub

End If

End If

'not found, so get the next hwnd
hWndChild = GetWindow(hWndChild, GW_HWNDNEXT)

Loop

End Sub


Thanks for the help, guys!
Daniel Christie