Results 1 to 2 of 2

The pesky "Object variable or With block variable not set" error

Threaded View

  1. #1
    Registered User
    Join Date
    12-01-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    1

    The pesky "Object variable or With block variable not set" error

    I've been searching online for clues on how to fix this error (there are plenty of cases)... but I can't find any example that would really help figure this one out. I'm getting the "Object variable or With block variable not set" error when I click on my click button.

    Public ConnectMM As Object
    Public GraphletsMM As Object
    
    Sub Gather()
     
        On Error GoTo Recover
        
        Dim x
        
        InitializeEP
        Application.Cursor = xlWait
        x = ThisWorkbook.ConnectMM.ReadTableVec(Worksheets("Main Table").Range("B3"), Worksheets("Main Table").Range("B4"), 0, 3, 0, Worksheets("Main Table").Range("c3:k27"))
        Application.Cursor = xlDefault
        If x <> "OK" Then MsgBox x
        
        Exit Sub
        
    Recover:
        If Err.Number = 424 Then
            InitializeEP
            Resume
        Else
            MsgBox Err.Description
            Application.Cursor = xlDefault
        End If
    End Sub
    Any assistance would be greatly appreciated.

    Thanks!
    Pedro
    Last edited by Cutter; 08-22-2012 at 05:58 PM. Reason: Added code tags

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