+ Reply to Thread
Results 1 to 1 of 1

An FYI: Runtime Error 91 (Object variable not set)

Hybrid View

  1. #1
    Registered User
    Join Date
    10-12-2012
    Location
    Philippines
    MS-Off Ver
    MSO 2013
    Posts
    15

    An FYI: Runtime Error 91 (Object variable not set)

    Hi,

    I was at MSDN site reading about Runtime Error 91 because I am experiencing one and just couldn't see the obvious:

    Here is my code where I am getting the error:

    Private ClassInstance as ClassModule
    
    Sub()
    'codes....
    ReturnValue = ClassInstance.ClassModuleFunction(ParameterA, ParameterB)
    'codes....
    End Sub
    That code above throws me the Runtime 91 error.

    Private ClassInstance as New ClassModule
    
    Sub()
    'codes....
    ReturnValue = ClassInstance.ClassModuleFunction(ParameterA, ParameterB)
    'codes....
    End Sub
    It took me some time to figure out my self what my 'miss' was, and I felt stupid after I did.

    I wanted to share that experience at the link I provided but there is no facility for that in there, so instead I posted this thread to share to anyone who might stumble upon my post!
    Last edited by exceltabz; 04-18-2014 at 09:30 AM.

+ 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. Runtime Error 91 - object variable or with block variable not set
    By 0celj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2013, 09:40 PM
  2. [SOLVED] Runtime Error '91': Object variable... When Running in Range Selection
    By Stonesteel15 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-01-2012, 09:50 AM
  3. runtime error 91 object variable or With block variable not set
    By tullemann in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-14-2011, 01:27 PM
  4. Replies: 8
    Last Post: 02-17-2009, 02:24 PM
  5. Runtime error 91 - Object variable or with block variable not set
    By Christian411 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-04-2008, 08:05 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