Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
mfq mfq is offline
external usenet poster
 
Posts: 6
Default Getting inconsistent Error 91-Object variable or With block variable not set

I'm getting Error 91 inconsistently when I run my macro. Macro stops
when it reaches the "USERNAME" line. I've tried setting the object to
nothing at the end and also using a fully qualified name. None works.
Anybody have any ideas? Does this have something to do with the browser
object? (I'm using Excel 2000)

Here's my code:
'''''''''''''''''''''''''''''''''''''''''''''''''' START''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''
Public Sub FHLBSF()
Dim dFRC(1 To 13, 1 To 3) As Double
Dim ie As Object, ipf As Object, tmpWksht As Object
Dim dDuration As Double, PctDone As Double

' Prepare to open the web page
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = False

With ie
.navigate "https://member.fhlbsf.com/member/admin/login.asp?"
Do Until Not .Busy
DoEvents
Loop
End With

' INCONSISTENT ERROR 91 HERE
ie.document.all.Item("UserName").Value = sUName
' ERROR
ie.document.all.Item("Password").Value = sPW
ie.document.all.Item("submitButton").Click

ie.navigate sStandardVRCURL
Do Until Not ie.Busy
DoEvents
Loop

ie.ExecWB 17, 2
ie.ExecWB 12, 0

'Logout
With ie
Set ipf = ie.document.all.Item("menu5")
ipf.Click
End With

ie.Quit
Set ipf = Nothing
Set ie = Nothing
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''' END''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime Error '91' Object variable or With block variable not set Alec Coliver Excel Discussion (Misc queries) 2 October 24th 09 02:29 PM
VBA: Object variable or With block variable not set (Error 91) - ??? Mac Lingo[_2_] Excel Programming 4 November 2nd 05 01:59 AM
Run-time error '91': "Object variable or With block variable not set Mike[_92_] Excel Programming 2 December 30th 04 10:59 AM
Cells.Find error Object variable or With block variable not set Peter[_21_] Excel Programming 2 May 8th 04 02:15 PM
Error 91 - Object variable with block variable not set Jim[_35_] Excel Programming 2 November 27th 03 03:34 AM


All times are GMT +1. The time now is 08:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"