goto

  1. G

    On Error GOTO Quit

    On Error GoTo Quit: Quit: MsgBox ("Please Add Data to Template Sheet" _ & vbNewLine & "Then Run Program") Hello All, I have the above code. The On Error GoTo Quit is at the top of the code, with the Quit: at the bottom. The problem is my message box keeps popping up, even when no errors...
  2. I

    Code to work to specific row and not whole row

    Afternoon, Working code in use shown below. Currently this code operates the whole of column B where i would like it to stop at the last row. So currently my last row with data in is row 19 BUT then i also see the message if i type in row 369 where at present its empty. Basically find last row...
  3. N

    VBA code to find a cell matching two criteria

    Hi, I have a code that works fine with all conditions accept the one and need your help please My code says: Check if the name is exist or not If not, then GoTo new_item (it works great) If exist and the BarCode is exist for the same name then just add the quantity (This is what I need) If...
  4. kelly mort

    Customized Datepicker code amendment needed - (a bit complex task)

    This was the Link to the full code and workbook given to me by @RoryA https://www.mrexcel.com/forum/redirect-to/?redirect=https%3A%2F%2Fwww.contextures.com%2Fexceldatepicker.html Previous Thread...
  5. R

    Replacing an On Error with an If, regarding copying cells that may not exist after a filter

    Hi everyone. I'm using VBA Autofilter to cut down a large database of products and copying whats left over to a temp sheet, it's defined like this: LastrowAD = Cells(Rows.Count, "A").End(xlUp).Row Dim TourCopyRng As Range Dim DateCopyRng As Range Dim NameCopyRng As Range Dim CostCopyRng As...
  6. N

    Search and Filter Time

    hi guys, i need to search and filter time . it is searching text and numerical values. but when i search for time it is hiding the data. below is my database and the code i used. <colgroup><col style="text-align: center;"><col style="text-align: center;"></colgroup><tbody> LINK CLINK...
  7. T

    Multiple error handling

    I am trying to handle multiple errors and am a bit surprised the following actually works: On Error Goto Errhandler ' Do something Exitpoint: On Error GoTo 0 ' OK this line is not actually needed. Exit Sub ErrHandler: On Error Resume Next 'Do something...
  8. P

    Track changes on a Worksheet in Excel with VBA

    I am currently using the following: Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("O:T")) Is Nothing Or Range("W2") = vbNullString Then GoTo Skip If Range("W2") <= Range("W1") Then If Not Intersect(Target, Range("A:U")) Is Nothing Then Call...
  9. B

    GoTo Function in VBA checking values

    Can anyone help with the following, I am trying to miss the email module when checking through my code, I want the to skip this part of the code: Call EmailOutOfDate (Email, ExpDate, Documents, Days Remaining) and check a value in the cell which determines whether or not an email should be...
  10. I

    If Then code advice please for existing working code

    Evening, I am using the code shown below. I need to add a small piece of come to it if you can advise please. Basically you type a value in cell B7 & a date is also then entered into cell E7 Ive noticed that should you delete the value in cell B7 the date in cell E7 is still present. So how...
  11. M

    VBA to insert rows

    Hi ive searched google to try and find answer to my problem but there are similar questions but dont know how to manipulate the vba to suit me. My problem is i need to achieve the following i enter a value into A1 e.g 10 and it would then goto the start of my table data say A16 and then copy...
  12. R

    VBA to check SAP Purchase Requisition attachments for Service

    Guys, I am struggling with this.... I am trying to check if there are attachments in PR for service, but I can only check if my macro click to open the attachment table. In some cases, when there are not attachments, the SAP crashes because the macro opened the table where wasn't able to open...
  13. T

    Multiple error handling

    The problem I have is to open password protected files. I know of 2 possible passwords, so if either works, then fine, otherwise I want to display a message informing the user that neither passwords are correct. This is my code: On Error GoTo Err1 Workbooks.Open...
  14. R

    On Error GoTo Next not skipping code when error.

    Hi all, Have a sheet I'm filtering and copying the visible cells in this Macro, but in some rare circumstances, once the filter is applied, there are no visible cells. On Error GoTo SkipTourCopyRng.SpecialCells(xlCellTypeVisible).Copy temp.Range("A12")...
  15. R

    VBA error handling problem

    Hi, I’m having a problem with the following tract of VBA. It is intended that it should loop round until a window with a particular title (as held in string wtit) is detected. It works ok if the said window already exists before running the code, but it fails on the SECOND time round the loop...
  16. H

    Application Goto Reference

    Hello, I created userform and added Application Goto reference in a code. The code is, when I add sheet name to the textbox5 then application goto reference goes to that sheet. But if that sheet doesn't exist, which code do I need to get msgbox that "sheet doesn't exist"? Please see below my...
  17. S

    Coding doesn't reset till mouse click

    I have some coding I've written- it's designed to send an automated email in the event that an error comes up in the coding for the workbook...anyway- when it runs it generates a window for outlook that, after 5 seconds, allows you to allow or deny the automated email to be sent. If clicking...
  18. M

    On Error Loop

    I want On Error to loop indefinitely if necessary. (On very few occasions it takes 4/5 attempts to force my code to go through, but most times it's fine) On Error GoTo StartAgain7StartAgain7: On Error GoTo StartAgain7 Call extract_details The on error works the first time around, but if I get...
  19. M

    Paste ONLY paste the values, and nothing else

    In my workbook, I am trying to make it so if the user pastes any data from another cell in the workbook (or from another workbook), it will only paste the values from the original cell(s), but nothing else, such as the formatting, borders, cell background color, etc. I found some code in...
  20. JenniferMurphy

    On Error handling

    This web page, http://www.cpearson.com/excel/ErrorHandling.htm has this to say about On Error GoTo 0 In my code, it isn't working. This line causes a Value error in the calling cell. Parms = Split(PArgs(i), "=") VBA does not "display its standard run time message box" as claimed above. I...

Some videos you may like

This Week's Hot Topics

Top