+ Reply to Thread
Results 1 to 3 of 3

Question about Run-time error '91'

  1. #1
    Registered User
    Join Date
    09-09-2014
    Location
    Ann Arbor, Michigan
    MS-Off Ver
    Office 365
    Posts
    10

    Question about Run-time error '91'

    I am receiving the Run-time error '91': Object variable or With block variable not set
    at the line of code Sheets("FOR COPY MACRO").Range("W1").Value = ie.document.all.Item("txtTotalCommitIB").Value
    in which I am assigning one of the cells in my workbook the value in a text field on a web page.
    However, when I go into the code to debug it, the program runs correctly when I hit the continue button. Any ideas why it might be working, but not working at the same time?

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Question about Run-time error '91'


    Hi,

    maybe item is not found …

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Question about Run-time error '91'

    Probably better to post more of the code.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Question about Run-time error '91'

    It could be working when you step through because that is giving the browser time to load the page completely/properly.
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Run time error question
    By lmausolf in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 12-08-2017, 05:03 PM
  2. Cannot Publish Excel Pivot Chart - Run Time Error
    By crisb184 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2013, 07:04 AM
  3. run-time error ;2147023179 (800706b5) time automation error interface unknown
    By karthik72 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2012, 09:31 AM
  4. Question about VBA amortization table Run-time Error '1004'
    By rollintide89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2011, 02:03 AM
  5. Question on Source of Run-Time Error
    By ern2ern in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2007, 10:56 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1