Error

  • Thread starter Thread starter Erica Roberts
  • Start date Start date
E

Erica Roberts

I am attempting to write some code that auto submits to a few search
engines. The code is crashing when submitting to DMOZ on the
wbbrowser.document.all("submit").click() line. This same line of code works
on Yahoo but not when done the 2nd time under DMOZ. My code is below. the
DMOZ Code is the last set.

The error I am getting is Public member 'click' on type
'DISPHTMLELEMENTCollection' no found.

Private Sub cmdStart_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdStart.Click

Dim i As Integer

Dim SubUrl As String

Dim SubName As String

Dim SubTitle As String

Dim SubDesc As String

Dim SubEmail As String

Dim SubKeywords As String



If Me.lsvDomains.Items.Count > 0 Then



For i = 0 To Me.lsvDomains.Items.Count - 1

If Me.lsvDomains.Items(i).Checked Then

SubUrl = Me.lsvDomains.Items(i).Text

SubTitle = Me.lsvDomains.Items(i).SubItems(1).Text

SubName = Me.lsvDomains.Items(i).SubItems(2).Text

SubEmail = Me.lsvDomains.Items(i).SubItems(3).Text

SubDesc = Me.lsvDomains.Items(i).SubItems(4).Text

''********Submit to Yahoo

Dim URL As String = "http://add.yahoo.com/fast/add?158789" '

Dim Flags As Integer = 0

Dim TargetFrame As String = ""

Dim PostData As Object =
"category=Reference&spaceid=158789&noexpress=1&class=YHOO&pass=2"

PostData = System.Text.Encoding.GetEncoding(1252).GetBytes(PostData)

Dim Headers = "Content-Type: application/x-www-form-urlencoded" & vbCrLf

Me.wbBrowser.Navigate(URL, Flags, TargetFrame, PostData, Headers)

Do

Application.DoEvents()

Loop While Me.wbBrowser.Busy



wbBrowser.Document.All("title").Value = SubTitle

wbBrowser.Document.All("url").Value = "http://" + SubUrl

'wbBrowser.Document.All("location").Value = txtlocation.Text

wbBrowser.Document.All("comments").Value = SubDesc

wbBrowser.Document.All("name").Value = SubName

wbBrowser.Document.All("email").Value = SubEmail

wbBrowser.Document.All(".submit").Click()

Do

Application.DoEvents()

Loop While Me.wbBrowser.Busy

''******Google.com

Me.wbBrowser.Navigate("http://www.google.com/addurl?q=http://" +
SubUrl + "&dq=&submit=Add+URL")

Do

Application.DoEvents()

Loop While Me.wbBrowser.Busy

''*****Dmoz.com (Open Directory Project)

wbBrowser.Navigate("http://dmoz.org/cgi-bin/add.cgi?where=Regional/North_Ame
rica/United_States/Ohio/Business_and_Economy/Real_Estate")

Do

Application.DoEvents()

Loop While Me.wbBrowser.Busy

wbBrowser.Document.all("url").value = SubUrl

wbBrowser.Document.all("title").value = SubTitle

wbBrowser.Document.all("description").value = SubDesc

wbBrowser.Document.all("email").value = SubEmail

wbBrowser.Document.all("submit").click()





End If

Do

Application.DoEvents()

Loop While Me.wbBrowser.Busy

Next



End If



End Sub
 
Erica Roberts said:
I am attempting to write some code that auto submits to a few search
engines. The code is crashing when submitting to DMOZ on the
wbbrowser.document.all("submit").click() line. This same line of code works
on Yahoo but not when done the 2nd time under DMOZ. My code is below. the
DMOZ Code is the last set.

You don't need to post the same question more than once.
 
Herfried K. Wagner said:
You don't need to post the same question more than once.
MS-MVP · VB Classic, VB.NET
<script></script>

Most people don't scroll down to view all of the messages. I didn't think it
was a big deal. I've never gotten a question answered in this newsgroup, so
I though it might help if i kept refreshing the topic.
 
Erica Roberts said:
Most people don't scroll down to view all of the messages. I didn't
think it was a big deal. I've never gotten a question answered in
this newsgroup, so I though it might help if i kept refreshing the
topic.

You are right, but I don't think it's necessary to refresh every hour. :-)
I'd probably ask one or two days later (in the same thread).
 
Erica Roberts said:
Most people don't scroll down to view all of the messages. I didn't think it
was a big deal. I've never gotten a question answered in this newsgroup, so
I though it might help if i kept refreshing the topic.

There are hundreds of people who don't use the web interface. They use
a newsreader like Outlook Express and will reply to your post even if
it's some days old.
 
Herfried K. Wagner said:
There are hundreds of people who don't use the web interface. They use
a newsreader like Outlook Express and will reply to your post even if
it's some days old.


Ok, thanks. I'll know this for future questions. :)
 
Erica,
Mostly Charles answers all webbrowser questions,
He knows such a lot of it, that others keep quiet.
But he is mostly active from friday to sunday.
But maybe he sees your message.
I put something extra in the top of the subject from this message.

Cor
 
Back
Top