on error goto

  1. A

    Stuck in an error Loop

    Hello All, I tried to do a loop that would write an entry to an error log sheet in the event a folder couldn't be created or already existed, but I haven't done it well, and continue to endlessly generate errors. If someone has any insight into where I went wrong, or suggestions on a more...
  2. V

    On error goto while looping

    Hello, I am currently in process of learning the VBA so please be gentle :D I have problem with "On error goto" statement inside looping. The aim is to categorize the movies on their length, create the sheet, name it after the category and copy the movies within the category to the new sheet...
  3. K

    Error Handling Exit Sub

    Hello, I have an OnError GoTo statement. If there is an error with the MkDir (aka, the file already exists), then I want it to go to the ErrMsg that asks if the user wants to continue or not. If they continue, the files will overwrite. If they don't, the macro ends. This is working perfectly...
  4. C

    Only run macro if there is no errors previously

    Hi. I writing a macro to save my file and to do some procedures after it, but I ran into a little error. When I run the macro, and it asks for the file location and I escape, the macro goes to the error but it stills cleans the sheets (limpafolhas), which I don't want to, unless the saving is...
  5. E

    Create New Folder if Folder Doesn't Exist

    Hello! So I've created the following formula that should create a new folder based on the year, but if it already exists, I don't want to create the new folder. This formula seemed to work well, until I did a troubleshoot of "2018" by replacing TodayYear with "2018"... it did not work then. Can...
  6. C

    ON Error GoTo Label 'In a loop'

    Maybe someone can help me with this? I have a loop going through a column to see if anything is not zero. If there is an error in one of the cells I want is to go to the error handler and perform a set of statements. However, I'm getting issues with the loop not ending as the variable will not...
  7. T

    Error handling

    Good afternoon, I'm looking for a way to define an 'On error' statement that would just work for the line underneath the statement. With the statement below, I'm looking for a (week)number from 1 to 53. Weeknumber = InputBox("What week are you after") If the user would enter anything else I...
  8. M

    On Error GoTo Issue with Worksheet Function

    Hello, I am having issues with the following code in Excel 2010: Dim i As Long Dim NewBottomRow as Double Dim Row as String For i = 1 To NewBottomRow - 1 On Error GoTo Hop Row = Split(ActiveCell(1).Address(1, 0), "$")(1) Selection.Value = WorksheetFunction.Average(Range("A"...
  9. M

    "On Error" Statement nested in for loop

    Hello, I'm new to VBA Programming, but my first program may be a little more complicated than I can handle. Here is a segment from my code: On Error GoTo Error_Handler For i = 2 To top With Range("I" & i + 57) .Formula = "=VLOOKUP(H" & i + 57 & ",F$59:G$" & top + 57 & ",2, FALSE)"...
  10. M

    Multiple on error goto statements

    Hi all, I've found various threads on problems similar to the one I'm having but none of them appear to be working for me. All I'm trying to do is copy and paste various results from one excel sheet to another - the macro is really simple and works fine. The only problem is that in some...
  11. K

    Run Time Error 91 on Cell.Find

    Using FIND in my code and getting a run-time error even with a ON ERROR GOTO line preceding the FIND line. I'm trying to increase the row height of the cell that contains a particular text value. The sheet may or may not have that text and it's not always in the same cell, so I thought the ON...
  12. C

    Error Handling in VBA

    Hello Below code is using the find method to search through a list and when an error occurs (find does not locate) it will copy over the missing information from one workbook to another. My issue is the first time the function does not find the value in the list it is not going to the error...
  13. J

    Error using the instruction on error goto

    I have the following code that is causing me the error "Object Variable or With block variable not set" The code roughly what it does is: it opens a file, search for a word, when find cut and paste a range of cells in another file. When he returns to find and not find the word I get an...

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