[AccessD] Fw: Web Page Error

Rocky Smolin rockysmolin at bchacc.com
Sun Nov 3 23:41:11 CST 2013


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




More information about the AccessD mailing list