1. H

    Want to understand a code line

    I have a code whose 4 lines are: If a(q) > 0 Then findhigh = Format(a(q), "0.00") GoTo finish End If I want to understand, If a(q)<=0 Then WHAT WILL HAPPEN? Will GoTo finish line get ‘activated’? 2nd line will not be activated? i.e. IF the If condition…is not TRUE Then does it works as Else...
  2. G

    Run-time error 5 with Dir

    Hi all, I have issues dealing with two common scenarios with my folder creation and document filing macro. Three scenarios exist Entity folder and sub folder exist - program files automatically This seems to be working fine as long as I do not run into any of these exceptions below Sub...
  3. M

    UserForm to Go To column and row

    Hello everyone, I have very basic VBA skills and the current problem seems like a simple problem, but I am having trouble with this. I am trying to use a userform to pop up for the operator, have them select two items from two listboxes (1 list is the column headers, 1 list is the row headers...
  4. S

    Changing Window Within Workbook

    Within a Workbook, I have a window (Sheet2) that needs to be active for entering raw data and a window (Sheet1) that will be up on a monitor, showing live, manipulated data. In order to keep the current line item on the screen I have it run Application.Goto Target.EntireRow on Sheet1, which...
  5. Guzzlr

    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...
  6. 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...
  7. 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...
  8. 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 Previous Thread...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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")...
  19. 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...
  20. 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...

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
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 "".
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