Grover Rover
New Member
- Joined
- Jan 24, 2013
- Messages
- 4
I am writing this stupid little program, and half the time it works, and the other half it doesn't. I am not very experienced at VBA, and I am just starting to learn. Any help would be appreciated. Here is my code.
Private Sub CommandButton1_Click()
Dim doc As Object
Dim ie As Object
Dim thing As String
Set ie = CreateObject("internetexplorer.application")
ie.Visible = True
ie.navigate "Giovanni Fabriciaco - Wikipedia, the free encyclopedia"
While ie.Busy
DoEvents
Wend
Set doc = ie.document
thing = doc.Title
thing = Left(thing, Len(thing) - 35)
Application.Speech.Speak "Here is a nice article about " & thing
End Sub
The bolded Line is where is stops every time.
Private Sub CommandButton1_Click()
Dim doc As Object
Dim ie As Object
Dim thing As String
Set ie = CreateObject("internetexplorer.application")
ie.Visible = True
ie.navigate "Giovanni Fabriciaco - Wikipedia, the free encyclopedia"
While ie.Busy
DoEvents
Wend
Set doc = ie.document
thing = doc.Title
thing = Left(thing, Len(thing) - 35)
Application.Speech.Speak "Here is a nice article about " & thing
End Sub
The bolded Line is where is stops every time.
Last edited: