runtime error 91

  1. A

    VBA Runtime Error 91 with String variable

    Hello, I have had this code working with the text manually entered into the code and I have tested the code in a separate macro on its own but when i put it together it give me this error. I understand it is due to something not having a value set but as it happens on the line setting the...
  2. M

    Object variable or with block variable not set

    Dear Gents, The following code can run well sometimes, but after run other macro , following code show run time error 91: Object variable or with block variable not set Would you please help me to figure out this problem? Thanks. Option Explicit Public rngA, rngB, cell As Range Public a, B, C...
  3. J

    VBA code for Pivot Table results in "Runtime Error 91: Object variable or with block variable not set"

    I am trying to build a macro to refresh multiple pivot tables in a loop without having to use the name of the pivot table "PivotTable1", etc.. I found this code: Sub UpdateWorkStreamIssues_LOOP() ' Sheets("Ambulatory").Select ' UpdateWSIssues Macro LOOP Dim pt As PivotTable For i = 1 To 2...
  4. H

    Run-time error 91

    Hi, I am trying to run the code listed below and I get an run-time 91 error (Object variable or with block variable not set). Could someone please help me to understand why I am getting this error. Thanks. Sub TestCode() Dim mybook As Workbook, ElectricalCableSchedule As Workbook, mysheet As...
  5. R

    Runtime Error 91 when dropdown changes are made the second time

    Good afternoon all. I hope you are doing well. This is my first post here on Mrexcel so please excuse any lapses in formality that I may cause. Thank you all for the valuable information that is provided to this VBA newbie, it has been a great help. I have been working on a complicated userform...
  6. J

    Runtime error 91

    Hello, When Ever I run my code I get the runtime '91': object variable or with block variable not set. Any help? Dim oXL As Excel.Application Set oXL = CreateObject("Excel.Application") oXL.Visible = True oXL.VBE.ActiveVBProject.vbComponents.Import ("\\LG-NAS\Parallax")
  7. E

    Custom VBA Menu gets disabled after runtime error 91

    Hello, Thanks for viewing my thread. I am troubleshooting a macro enabled spreadsheet which adds a custom menu through vba. It does not have an Add-in but adds the menu before Help, so the custom menu appears under Add-Ins. The custom menu is dynamically created on workbook_open() and consists...
  8. M

    Skip multiple empty cells in loop

    I want to leave empty spaces in this spreadsheet for consumable items in an inventory system. It highlights different sections of quantity values with varying minimums. I want to be able to leave up to 10 cells blank in the loop but if i have more than one or two it crashes out. i only started...
  9. M

    Vba issue run time error 91

    Here's a code that I've been working on. It will filter across all sheets, but wont remove the filter past the active sheet. Also in the highlighted area is a runtime error 91: Object variable or with block variable not set Sub filter()<?xml:namespace prefix = o ns =...
  10. C

    Runtime Error '91'

    I am very new to Vb and have got myself into what is a relatively big project for myself. I get the runtime error '91' object varaible or with block variable not set when running this code. I have just pasted the portion that causes the error. Before this portion of the script it is being...
  11. V

    Runtime error 91

    Hi, I'm trying to find a text in a sheet and pass adjacent value to another sheet. While running the code given below, I'm getting runtime error 91. I tried many options, but in vain. Kindly help.Please find the code below Sub assign_to_pp(tosht As String, fromsht As String) Dim u, v As...

Some videos you may like

This Week's Hot Topics