error 91

  1. P

    .ListObject.QueryTable.Refresh triggers error 91

    Hi everyone, I have an excel workbook with 2 powerquery queries that produce 2 tables named "success" and "Fail". I have 2 buttons which associated codes are Private Sub Fail_Refresh_Click() Application.Range("Fail").ListObject.QueryTable.Refresh BackgroundQuery:=False End Sub Private Sub...
  2. A

    VBA Cascading Dependent Drop Down Lists does not accept values

    Hi all I have downloaded the next file. It has a userform that makes a dropdown list for each column and it filters the results (Which i belive it's very cool) The problem comes when i perform some changes to the database, in where i put some values for the last column, as you can see in the...
  3. E

    Error 91 while scraping web

    With this vba-code : If Not DishesDoc.getElementById("ContentPlaceHolder_LblRecetteTempsPrepa") Is Nothing Then Failure = DishesDoc.getElementById("ContentPlaceHolder_LblRecetteTempsPrepa").innerText 'Failure being declared as an object End If I want to scrape data from this piece of...
  4. V

    Why do I get an object error 91 on this usage of code?

    Set findValue = imageB.Range("X:X").Find(what:=myarray(j, 1), _ LookIn:=xlValues, lookat:=xlWhole) 'Using to match values to original launched data Set searchValue = dashB.Range("X:X").Find(what:=myarray(j, 1), _ LookIn:=xlValues, lookat:=xlWhole)...
  5. V

    Why is the following code giving an error 91?

    I can't figure out what I haven't defined properly. The line: If Not (Intersect(Target, Range("H" & rowNum))) Is Nothing Then Gives the error. Private Sub Worksheet_Change(ByVal Target As Range) Dim rowNum As Integer Dim cellResult As Variant rowNum = ActiveCell.Row - 1...
  6. D

    Selection.Find Run time error 91?

    Hi All, Hope you are all well! I'm struggling to overcome the error in relation to the below code, would anyone be able to help me out? Basically I keep getting the 'Run time error 91' for the bolded section of the below code. In the below I'm searching Column E for the value "4" and if/once...
  7. T

    Excel VBA Runtime '91' error during lookup in Internet Explorer

    Good day. I am trying to lookup some Warranty Expiration dates via Internet Explorer and return the results to and Excel spreadsheet. Currently the code is very rudimentary. I have not yet added to code to read serial number from the worksheet or write the results back to the spreadsheet. I just...
  8. H

    Error 91 concerning Objects or with Bloc but I dont have anything like this in my code

    Hello, I have a small problem. My code is running half of the time. When I press on my command button, my code works fine. When I repress on it to try something else, my code isnt running and I have an error 91. I press on end and retry my command button and it works fine. I dont know what is my...
  9. B

    Error 91 when save and close workbook and stops making a backup file.

    Hello In my code to export a query to Excel, I am trying to adapt the code from Titleist23 https://www.mrexcel.com/forum/excel-questions/584129-disable-access-excel-backup-file-vba.html to save and close the workbook and stops making a backup file. This is my code working fine to export a query...
  10. B

    Excel 2016 error91 setting xlPrimary axis and xlSecondaryaxis to none

    Hello I have a Chart in a Worksheet. In the Chart, I am trying to set xlPrimary axis and xlSecondaryaxis to none. I opened the workbook in Excel and made the changes manually with the Recorder on. This is the recorded macro code: ActiveChart.Axes(xlValue, xlSecondary).Select...
  11. B

    VBA Giving Run-time error '91'

    I'm using the following to return links from a search on Google: Sub XMLHTTP() Dim url As String, lastRow As Long Dim XMLHTTP As Object, html As Object, objResultDiv As Object, objH3 As Object, link As Object Dim start_time As Date Dim end_time As Date lastRow =...
  12. I

    Trying to save and close excel (2007) from ms access (2007) vba

    Still learning Ms Access vba but learning fast. I am not understanding fully and I am stumped on just on two things of which I am sure solve one, the other will also be solved. Spent the last 2 days with no progress. :( I have a button on my form opening my excel spreadsheet (template)...
  13. K

    Error 91 - Defining variables

    Hello and thank you for your time. I have created a report that is shared with clients that has a private sub for when the workbook opens. One of my clients is getting an issue with the bold line of code. Here is some basic information: I wrote the code/created the workbook in Excel 2016...
  14. S

    End sub creates "Runtime Error 91: Object variable or with block variable not set"

    Apparently this happens when a variable is not defined, but all mine are, as far as I can tell. Also, when debugging, the error appears on the End Sub line. That is, the macro (seems to) exit correctly, but as it exits I get the error msg. If the error box could be forced to not appear it would...
  15. K

    Run time error 91

    I am developing a spreadsheet for analysing expenses & other costs. The data will be in one of the tabs, the full name of which is not known but we know that the name starts with a known string - in this case "statement". What I want is the end of the name: F_Nam. What have I done wrong ? I...
  16. S

    Creating a Pivot Table with VBA

    Hey guys, I am trying to create a pivot table with VBA based off of some data that I have. Here is my code: Option Explicit Dim dolSht As Worksheet, hourSht As Worksheet Dim sumSht As Worksheet, byCustSht As Worksheet, allCostSht As Worksheet Dim ptCache As PivotCache Dim pt As PivotTable...
  17. S

    VBA Error '91' on ActiveWorkbook.Save

    Hi All, Long time user, first time poster here. I put that down to may other people having the issues I have before I do and then the Gurus here sorting them out in a very well written way so thanks for that. I however have an issue I have been unable to find the resolution to. I recently wrote...
  18. P

    HELP - Error 91 with recorded macro

    Hey so i am trying to make a macro that executes the find next -> replace all path. Highlight a column and replace certain values in the column with a different value. i have no experience with VBA so i used the record a macro button in excel. The resulting macro gives me an error 91 when i try...
  19. M

    Worksheet_change Error 91

    First time writing worksheet_change code and I have gotten 2 codes to work, but I cannot get them to work together. The first piece of code is just to hide and unhide tabs, and it works until I paste the second piece of code which is to replace cell values when entered into a specific range...
  20. R

    Attempting to Highlight Cells Based on String within Cell

    Hello! Basically what I'm trying to do is the following: First, determine if I'm in the correct row of cells based on the String value of the cell. i.e If the current cell's string value contains the string AB1 or AB2, go through the entire row. Once that has been determined, I would like to...

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