Hi all,
I would like to create a macro in excel to search stocks in website: http://nextview.com/

'Success Login and Search Stock for NextView
Function Login()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
'create new instance of IE. use reference to return current open IE if
'you want to use open IE window. Easiest way I know of is via title bar.
IE.Navigate "http://www.nextview.com/"
'go to web page listed inside quotes
IE.Visible = True

While IE.busy
DoEvents 'wait until IE is done loading page.
Wend

Set UserName = IE.Document.getElementById("username")
Set Password = IE.Document.getElementById("pwd")
Call Wait

IE.Document.all.UserName.Value = Range("A3").Value
IE.Document.all.pwd.Value = Range("B3").Value

Set Login = IE.Document.getElementById("frmlogin")
Login.submit

Call Wait
End Function

Function Search()
Call ActivateIE
'Dim IE As Object
' Set IE = CreateObject("InternetExplorer.Application")
Set S = IE.Document.getElementById("ss")
Call Wait

IE.Document.all.ss.Value = Range("F3").Value
Set SearchSubmit = IE.Document.getElementById("sb")
SearchSubmit.form.submit

End Function

Sub Wait()
' Waits 5 seconds
Application.Wait Time + TimeSerial(0, 0, 5)
' Continues here after pause
End Sub

Sub ActivateIE()
On Error Resume Next
AppActivate "Windows Internet Explorer"
End Sub
The problem happens in the section:
Set S = IE.Document.getElementById("ss")
Call Wait
IE.Document.all.ss.Value = Range("F3").Value
It will shows "Objects Variable or With Block Variable Not Set". I am using using a Button to Call Function "Search".

When I click the button, the error will occur. Please help. Thanks