Results 1 to 3 of 3

Thread: Runtime Error 91 : Object Variable or with block variable not set

  1. #1
    Join Date
    Jul 2009
    Posts
    74

    Runtime Error 91 : Object Variable or with block variable not set

    Hi,

    I get error message in excel VBA, and then my user data input. And then click on send, I get the following error!

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

    What does this error and How can I still send my favorites ?

    I have already removed the tool and once downloaded and installed again, but it continues to give the same message!

  2. #2
    Join Date
    May 2008
    Posts
    353

    Re: Runtime Error 91 : Object Variable or with block variable not set

    To remove the error message "Run-time error 91: Object variable or With block variable not set" try the following:

    (1) try to change If objItems (i). userProperties ( "exported") = 0
    If cf.Items (i). UserProperties ( "exported")

    (2) If this fails, make sure the 'exported' properties exist. From the sounds of it, which is a deprecated attribute, so you'll have to find an equivalent, perhaps viewing the properties of cf.items

  3. #3
    Join Date
    May 2008
    Posts
    244

    Re: Runtime Error 91 : Object Variable or with block variable not set

    Make sure the Recordset object is not based on the form's recordset if you plan to use the Delete or UpdateBatch methods. For an example, see the following code:

    Code:
    Sub Test()
    
       Dim rs As New ADODB.Recordset
       rs.Open "SELECT * FROM TableX", CurrentProject.Connection, _
         adOpenKeyset, adLockOptimistic
       rs.Delete
       rs.UpdateBatch
    
    End Sub

Similar Threads

  1. Replies: 3
    Last Post: 08-01-2011, 06:20 AM
  2. How to setup a JavaScript Object Notation variable?
    By hatred in forum Software Development
    Replies: 4
    Last Post: 04-02-2010, 02:25 AM
  3. Replies: 5
    Last Post: 25-01-2010, 04:59 PM
  4. Replies: 3
    Last Post: 25-04-2009, 11:34 AM
  5. Undefined variable error in Php
    By Capers in forum Software Development
    Replies: 3
    Last Post: 31-03-2009, 05:14 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
  •  
Page generated in 1,713,241,150.51374 seconds with 17 queries