+ Reply to Thread
Results 1 to 5 of 5

Run-Time error '91': Object variable or With block variable not set

  1. #1
    Registered User
    Join Date
    12-06-2012
    Location
    Woodstock, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    12

    Run-Time error '91': Object variable or With block variable not set

    Hello,

    I am getting the error "Run-Time error '91': Object variable or With block variable not set", which stops at 'visible = c.Address' in the code and I'm not sure why because I have defined both "c" and "visible". Any help is appreciated!

    Please Login or Register  to view this content.

    Thanks,
    Brad

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Run-Time error '91': Object variable or With block variable not set

    Cell address can not be a range

    Dim visible As string

  3. #3
    Registered User
    Join Date
    12-06-2012
    Location
    Woodstock, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Run-Time error '91': Object variable or With block variable not set

    Thank you! I literally just tried that as you replied and got it to work.

  4. #4
    Registered User
    Join Date
    12-06-2012
    Location
    Woodstock, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Run-Time error '91': Object variable or With block variable not set

    Another problem...now on the 'Range(c).Select' portion I get a run-time error '1004': Method 'Range' of object '_Global' failed...

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Run-Time error '91': Object variable or With block variable not set

    You do not need to select, just delete that line, but I suspect the code will error on this line

    'Range(c).Select

    Please Login or Register  to view this content.

+ 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. Run time error 91 object variable or with block variable not set
    By Nirakshana in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2014, 07:56 AM
  2. Replies: 0
    Last Post: 04-16-2013, 07:15 AM
  3. Replies: 6
    Last Post: 12-21-2012, 08:03 AM
  4. Replies: 1
    Last Post: 09-25-2012, 08:03 PM
  5. [SOLVED] Intermittent Run-time Error 91: Object Variable or With Block variable not set
    By fraanchtoast in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-29-2012, 10:11 AM

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