error 91

  1. F

    Error 91 when using CopyHere to extract a zipped file

    I have a piece of code that creates a list of files in a folder. I then loop through the list and take different actions depending on the file type. One action is to extract a csv file from a zipped file. I then have a sub procedure to do the extracting if for each .csv file in the zipped on...
  2. T

    Handle Error Code 91 and Move on to Next Operation

    Hello, Help with this would be much appreciated. I wrote a program that seeks out a specific string and modifies the format of it's cell once it is found. Sometimes the string will exist on the sheet and sometimes it won't. I need the program to keep running and do its job if the string isn't...
  3. 9tanstaafl9

    Error 91 when using On Error GoTo. Works first time but not second.

    Is there some sort of rule against having more than one On Error Goto? I have two On Error Goto's in my macro, both of which WORK PERFECTLY if the other is commented out, but only the first works if they are not commented. I'm sure I'm missing something really basic but I can't figure it out...
  4. M

    Why simple Open_Workbook Macro works perfectly but error 91 when opened on another computer??

    Hello guys I am so frustrated. 2 days trying to decipher this. I have emailed a spreadsheet to all my internal customers and they all get the same error "Run-time error 91: Object Variable or with block variable not set" We all work on Excel 2010... so I don't think that's the problem When...
  5. S

    Dynamic Cell setup (Based on click to copy)- Error 91

    So here is my code Sub Worksheet_SelectionChange(ByVal Target As Range) 'single click version Range("J3:J32").Interior.Color = RGB(200, 160, 35) Range("K3:K3").Interior.Color = RGB(200, 160, 35) If Intersect(Target, Range("J3")) Or Intersect(Target, Range("J4")) Is Nothing Then Exit Sub...
  6. R

    Range Validation Error

    Trying to valdate a couple of cells before I allow the file to be saved and sent via email. I keep getting the error: (References the line of code "PName = Range("A3:D3") on Debug) Run-time error '91': Object variable or With block variable not set Not sure what my error is or if there's an...
  7. D

    Object Variable or With Block Variable not set????

    Hey everyone. I'm trying to run some code but I keep getting the Object Variable or With Block Variable Not Set message. I'm not using any object in the line that is causing the error. Could someone take a look at the code and let me know what I'm doing wrong? I'm getting an error on the last...
  8. C

    Object vairable - 91 error on setting a worksheet variable

    OK, so I have this code here, which will let me know whether the info entered is new data or changes to old data and put it into the correct sheet depending on which it is. Problem is, when I get to the if statement, when it gets to ws2= it causes the run-time error 91: Object variable or...
  9. S

    Plotting charts; Object Variable or with Block not set... but it worked 2 min ago...

    Hi, I've written a vba code to graph a large number of graphs for me with two data series on each graph. To test my theory on it working I broke it down into parts and ran each seperately as I went so I wouldnt have to sift through the whole thing to find an issue when I was finally finished...
  10. E

    Call a function in another Excel 2010 AddIn (.xlam)

    Hello all! I try to call a function/procedur in an Excel2010-AddIn (.xlam file) from another Excel2010-AddIn (.xlam file): Application.Run (filename.xlam!functionname) Both AddIn-files are in the same directory (the default AddIn directory). This call causes the error message "runtime error...
  11. S

    help with run-time error '91'

    I receive the run-time error after my very last end sub. The code runs everything I want it just shows that error at the end. The final end sub uses the bb code to make it blue. Sorry for the long code. I'm running Windows 7 and Word 2010. Public thisQuarter As String Public thisYear As...
  12. M

    code error help runtime 91

    I have been using this code as a macro to quickly highlight all items within a range under a certain value. i have just cut and pasted the code across several sheets and just changed the range of cells where it looks. cut and paste and change the range. over and over and over again. now im...
  13. T

    Intermittent VBA Run-Time Error 91 in Excel 2003 Macro/Windows XP/IE 8.0

    Hi All, I have looked for a day and a 1/2 and googled, read and experimented far and wide but am unable to sovle this problem. I have a VBA routine in Excel that automates logging into a website as follows : <code> Sub Mysub() Dim ie As Object Set ie =...
  14. S

    Error 91

    Hi guys, I am getting an "error 91 object variable not set". I have tried a few things and google but no joy. I just want the operation to finish so I can start another one. ps The symbol I'm searching for doesn't paste into here, box with a question mark in it. Anybody got some idea's...
  15. J

    Stop finding blanks in a range

    I have this VBA code to copy and paste from cell K10 to C13-22 and it works okay but when it gets to 22 it comes up with a runtime error 91 - object variable or With Block variable not set. I assume this is because it does not know what to do when it gets to 22. I wondered if you knew a way of...
  16. C

    ActiveWorkbook.ReadOnly Object Variable error

    I have enough experience with VBA and macros to get into trouble, and this is my first post here. I have written a macro to be usde from Solidworks 2011 that opens an excel file, finds a part number(ModName) and then updates some values that are associated with that part number. After getting...
  17. D

    Error 91 Object Not Set: Can I initialise variables via code? [Excel 03]

    I'm attempting to write some code that creates a toolbar with some buttons on it that carries out some simple instructions; this is just a test before I try and incorporate it into the real spreadsheet. The first sub creates the toolbar and its commandbarbuttons and their properties. The second...
  18. C

    Run-time error '91' while using Find

    The code continues beyond what I put in here but it is not important. When the code reaches the dataobj.range line of code, I get this error. Any ideas why it is happening? Sub stacknew() Dim dataobj As Object Dim start Dim newstart Dim finish Dim stackx Dim X As Double Dim c As Double Dim i...
  19. R

    Help Please! - Saving a UDF as an Add-In Results in error 91

    Please help. I am trying to make UDFs and save as an add-in. When Excel trys to open the add-in I get: Run-time error '91' Object variable or With block variable not set Here is the code I am using in VBA: Function trythis(enterthis As Double) As Double trythis = enterthis +1 End...
  20. K

    Object variable or With block variable not set

    Hi, I have the following code, but I keep getting 'error 91: Object variable or With block variable not set'. Does somebody have a solution to this? Thank you very much! The code is moving the value of A1 and B1 to A2 and B2, the value of A2 and B2 to A3 and B3, ... every time A1 changes...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top