Results 1 to 18 of 18

Run-time error '91': Object variable or With block variable.

Threaded View

Nicholas1978 Run-time error '91': Object... 07-04-2012, 01:31 PM
FortySixAndTwo Re: Run-time error '91':... 07-04-2012, 01:41 PM
Nicholas1978 Re: Run-time error '91':... 07-04-2012, 01:53 PM
Nicholas1978 Re: Run-time error '91':... 07-04-2012, 01:55 PM
Nicholas1978 Re: Run-time error '91':... 07-04-2012, 01:56 PM
FortySixAndTwo Re: Run-time error '91':... 07-04-2012, 01:56 PM
FortySixAndTwo Re: Run-time error '91':... 07-04-2012, 01:57 PM
Nicholas1978 Re: Run-time error '91':... 07-04-2012, 02:22 PM
Nicholas1978 Re: Run-time error '91':... 07-04-2012, 02:37 PM
FortySixAndTwo Re: Run-time error '91':... 07-04-2012, 02:33 PM
Nicholas1978 Re: Run-time error '91':... 07-04-2012, 02:35 PM
FortySixAndTwo Re: Run-time error '91':... 07-04-2012, 02:42 PM
Nicholas1978 Re: Run-time error '91':... 07-04-2012, 02:55 PM
FortySixAndTwo Re: Run-time error '91':... 07-04-2012, 02:56 PM
Nicholas1978 Re: Run-time error '91':... 07-04-2012, 03:27 PM
FortySixAndTwo Re: Run-time error '91':... 07-04-2012, 03:34 PM
Nicholas1978 Re: Run-time error '91':... 07-04-2012, 03:58 PM
FortySixAndTwo Re: Run-time error '91':... 07-04-2012, 04:03 PM
  1. #1
    Registered User
    Join Date
    07-04-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    20

    Run-time error '91': Object variable or With block variable.

    Hi Guys,

    Hope that all of you are doing well. I am new to the forum and I really need some help. I am busy with a work project and I am getting the following error
    Run-time error '91': Object variable or With block variable on the following.
    Option Explicit

    Private Sub UpdateLists()
    Dim r As Long
    
    r = Columns("A").Find(What:=TextBox1.Value, LookAt:=xlWhole, After:=Range("A2")).Row
        TextBox2.Value = wksLookupLists.Range("B" & r)
        TextBox3.Value = wksLookupLists.Range("C" & r)
        TextBox4.Value = wksLookupLists.Range("D" & r)
        TextBox5.Value = wksLookupLists.Range("E" & r)
        TextBox6.Value = wksLookupLists.Range("G" & r)
        TextBox7.Value = wksLookupLists.Range("H" & r)
        TextBox8.Value = wksLookupLists.Range("I" & r)
        
    End Sub
    As soon as i run the macro from the sheet itself then it is working, but if i run it from a different sheet then i get this error. Will anyone please help me and give me some advice.

    Thanks alot
    Last edited by arlu1201; 07-04-2012 at 01:38 PM. Reason: Use code tags in future.

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