vba error handling

  1. most

    Handling errors from a WinHttpReq function

    Hi, I would like some assistance with handling errors from this function. SomeDownload1 will return WinHttpReq.Status = 404, what is the best practice of returning a error code back to sub routine? SomeDownload2 will run-time error at line 6 (WinHttpReq.send), how to handle this? I searched...
  2. J

    Handling errors in VBA calculations

    Hello I would like some advice. On one of my sub I have over 25 different calculations in VBA that get used to create a value. I am having problems where if one of the calculations is divided by zero then I get an error message. At the moment I am using the on error resume next. But this does...
  3. J

    Need some advice on error handling

    Hi.. I have created a complete the project with few userforms as my stock inventory. And the project running without any error. I need ur advice wether i did the codings in the right way or not. And need some advice for error handling. Below are the coding and pictures of my userform and...
  4. J

    Adding a msgbox if error occurs after input box

    I am having trouble adding in code to display a msgbox when a user inputs a variable text value into my inputbox that cannot be found. My code is looking for a outlook folder matching what the user entered into the inputbox (this value is variable) and if it doesn't find it, the vba will error...
  5. X

    HELP: VBA Run-time error '-2147417848 (80010108)'

    Hello, I am trying to run simple macro but I get this error: VBA Run-time error '-2147417848 (80010108)': Method 'Range' of object '_Worksheet' failed My procedure is following: Sub Fill_Empty_Cells_with_Formulas() Application.ScreenUpdating = False Dim rng As Range Dim i As Long...
  6. A

    Searching values on sheet and matching with Combobox coloum

    Hi Guys, I am trying to get this code to work, and just keep hitting my head against the wall not being able to get it to work. Below is the code i have at the moment. It loops over the cells on the sheet, the loops over the combobox list entries, when match is found copies to the sheet...
  7. P

    subscript out of range

    Hi, The following code seems to work to fine, however at the end it says "subscript out of range" - please could you help? Much appreciated. Sub exportsheets() Dim wbNew As Workbook Dim rngTM As Range Dim strPath As String On Error GoTo Errorcatch Application.ScreenUpdating =...
  8. P

    Type mismatch... VBA

    Hi When I run the following code I get the 'Type Mismatch' error: The code works ok for the first export (in terms of saving in location), however will not work thereafter. Sub exportsheets() Dim wbNew As Workbook Dim rngTM As Range Dim strPath As String...
  9. W

    How to Handle Errors in VBA: resume the loop with the next value

    Dear all, I am using a readily available piece of code that is supposed to use Google in order to search for a list of entries, returning the first result from each search. Here is the code itself: Sub XMLHTTP() Dim url As String, lastRow As Long Dim XMLHTTP As Object, html As...
  10. M

    VBA Help

    I have a code in excel to run through columns of names / emails / cc's / subjects / one body text and create an email in my drafts folder with the corresponding details. This uses the .to = , .cc = , etc. Our email server no longer recognizes the emails that get put into that field. Our IT...
  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. J

    error 438

    Dear all, In the Macro code given below, Public Sub sortet() Dim a As Integer Range("U6:U12").Select Selection.Copy Range("U13").Select Selection.Paste <label for="rb_iconid_4"></label> End Sub in the above sub-procedure the selection.paste showing error no 438 with a message "object...
  13. J

    Need Design Help - VBA newb in trouble.

    Hey Guys, Im working on a VBA app and playing around with Error Handling, and this is what my call for help revolves around. Im trying to determine the best way (and possible ways) to implement error handling. I've learned VBA is pretty limited in ErrHand (I've been doing some C# as well, so...

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top