[AccessD] Fw: Web Page Error

RANDALL R ANTHONY RRANTHON at sentara.com
Tue Nov 5 10:27:42 CST 2013


Dale,
I don't see where you're setting objCollection(i).classname to anything until you do your comparison?
:  Object variable or With block variable not set  ---  Indicates there's nothing in the object.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gary Kjos
Sent: Tuesday, November 05, 2013 11:16 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Fw: Web Page Error

Sorry but you are way beyond my level of expertise Dale.

Good luck figuring it out.

GK


On Sun, Nov 3, 2013 at 7:53 PM, Dale Kalsow <dkalsow at yahoo.com> wrote:

>  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
>



--
Gary Kjos
garykjos at gmail.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-------------Disclaimer---------------

This electronic message and its contents and attachments contain information from Sentara Healthcare and is confidential or otherwise protected from disclosure. The information is intended to be for the addressee only.

If you are not the addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this electronic message in error, please notify us immediately and destroy the original message and all copies.




More information about the AccessD mailing list