[AccessD] Fw: Web Page Error

Rocky Smolin rockysmolin at bchacc.com
Sun Nov 3 23:59:18 CST 2013


Are you overrunning the objCollection because your zero based indexing but
going to objCollection.Length?  IOW if objCollection.Length is 10 and you
start I at zero, you need to bail out of the loop at index 9 (the tenth
iteration) not 10 (the 11th iteration).

Just guessing here...


Rocky


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: Sunday, November 03, 2013 9:41 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Fw: Web Page Error


What is the value if I when it throws the error?  IOW is it happening on the
first pas through the loop?

Where do you set objCollection?

Rocky
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dale Kalsow
Sent: Sunday, November 03, 2013 5:54 PM
To: AccessD at databaseadvisors.com
Subject: [AccessD] Fw: Web Page Error

 I anyone able to answer my question?

Thanks in advance.

Dale 

On Friday, November 1, 2013 2:54 PM, Dale Kalsow <dkalsow at yahoo.com> wrote:
  
I have written some code in vba in excel.  The code opens a web site and
from data in the spreadsheet fills in the same web form from each row of
data.  If the web form does not come back with any data, the vba code closes
it.  However, if it does find some data, it is supposed to leave the web
form open.  The leaving it open part is not working.  Instead it throws an
error.  Can anyone help me fix the error?  The error is:  Run-time error
'91':  Object variable or With block variable not set.  I am getting this
error in the following block of code
 
 i = 0: blnLoop = True: intI = objCollection.Length
           While blnLoop
           
                MsgBox (objCollection(i).classname)
                    If objCollection(i).classname = "NoResultsSummaryText"
Then
                    IE.Quit
            
                    blnLoop = False
               End If
               i = i + 1
               If i >= intI Then blnLoop = False
           Wend
 
specifically on the:  If objCollection(i).classname = "NoResultsSummaryText"
Then
 
line of code.
 
Does anyone see how I can fix this?
 
Thanks!
 
Dale
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com/
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list