+ Reply to Thread
Results 1 to 5 of 5

runtime error 91 issue

  1. #1
    Forum Contributor
    Join Date
    03-27-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    290

    runtime error 91 issue

    When I run the macro from my pc (windows XP, Office 2007) I dont get any error but when Its run from a Windows 7 machine on Office 2010, I get run time error 91, Object Variable or With Block Variable not set.
    Im not sure why this is because the variable is set... but here is the macro.

    Please Login or Register  to view this content.
    I did notice an issue with the last section... but I copied that part from another website so I am not really sure what it does or how to fix it.

    Please Login or Register  to view this content.
    the Set IE = .Item(0)
    feels wrong, but im not sure what it does. It should detect if an internet explorer is open (I think) but im not sure what I should replace it with in order to open it.

    im not sure anyway, just a guess. If that isnt the issue, im not sure what is.

  2. #2
    Forum Contributor
    Join Date
    03-27-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: runtime error 91 issue

    So there was a problem with this:

    Please Login or Register  to view this content.
    however im not sure why because im not sure what it does. Could anyone explain what this actually means?

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

    Re: runtime error 91 issue

    It checks to see if there is a running instance of Internet Explorer, if there is it sets a variable, IE, to reference it, if there isn't it creates a new instance of Internet Explorer and sets the variable to reference that.
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    03-27-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: runtime error 91 issue

    Please Login or Register  to view this content.
    is what I said in red correct?

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

    Re: runtime error 91 issue

    Perhaps you'll find a better explanation in the same place you found the code.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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