goto

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. Trevor3007

    msgbox not working?

    hi, using the following to prompt the msgbox:- Sub gototots()Range("AI4").Select Application.Goto Reference:="R999C34" ActiveWindow.SmallScroll Down:=-12 Range("AI983").Select If MsgBox("Enter Yes to goto A174?", vbYesNo) = vbYes Then Application.Goto Reference:="R117C1"...
  6. I

    Userform copy rows of data into worksheet but ignore blank rows

    Hi there I have created a user form with rows of data for the purposes of using as an order form. At present there are only 3 rows but I eventually want to add further items. I am trying to apply coding that will review each line of data on the userform to see if it contains values and if it...
  7. A

    VBA Code to copy multiple rows from one sheet and insert them below activecell in another sheet

    Hi I have an error -2147417848 of Automation on line 70 when i use this macro, sometimes the first execution, and always the second: Public Sub InsertCopiedCells() 10 On Error GoTo InsertCopiedCells_Error 'IT IS NECESSARY TO CALL THIS MACRO FROM THE SHEET "TARGET" 'WITH A ROW...
  8. L

    Clean Up Code

    Hello, If someone has the time I would appreciate any help or suggestions to clean up the following code. It seems there are too many declarations but I am not that skilled in VBA. Thank you very much for your help in advance. Sub PopulateForm() With ThisWorkbook Dim myPass As...
  9. N

    Array or Loop how to question

    Hi guys, I'm still learning and I'm not familiar with using loops which I think would be the solution for this issue. So I have some code here that I wrote but I'm sure there is a much better way to input this using a loop or array: If Range("B9").Value = "" Then GoTo Handler Else...
  10. T

    Spaghetti code or not?

    Is writing spaghetti code always bad? Of the two approaches below, which is preferable, or should there be a better third approach? Approach 1: If Condition1 Then Do something1 Else Do something2 End If If Statement1 Then Do something1 Else Do something2 End If...
  11. M

    Tidy up VBA code.

    Hi I have VBA code that I have written....... It works but looks untidy. Can someone offer advice on how to tidy it up with a loop so I can extend the ranges that are compared? (Extend to B3:30 & C3:C30) Private Sub CommandButton1_Click() 'Security Pin If...
  12. P

    If Range of columns appears in Rng, Do Things

    I have the following: Sub Automatic_Highlights(Rng As Range) If Rng.Range("O:T") = True Then GoTo Skip ' In my head this should read "If Rng falls within Range("O:T"), Then GoTo Skip"; Or that's how I want it to read at least. Rng.Interior.ColorIndex = 7 Intersect(Rng.EntireRow...
  13. T

    Excel crashes when running macro after having changed interior color

    Hi, If I manually change interior color on a cell in the worsheet and afterwards run a macro excel crashes. It happens on most of the macros i'm using. Anybody who has any idea about what the issue can be? I'll include a very simple macro here as an example: Sub PRI_AntalJustera_()Dim rad As...
  14. I

    VBA- Navigation List

    Hello! I am trying to build a macro to be able to navigate in one sheet. It seems too complex to me, as I don't have programming background. The idea is the following, I have this summary list: <tbody> Column G Column I 100 USA 120 EU 140 JAPAN ... ... </tbody> Column G contains the...
  15. B

    Automation Error when building collection

    Dear Excel Experts, I have a simple piece of VBA code with some (messy) error handling that builds a collection by constructing a string and seeing if it exists in a larger collection. This code generates an application execution error on the second pass through the for next loop. Private...
  16. H

    Runtime error with exception handling

    In the following code I'm always getting a runtime error in the label file2 when it doesn't exist. As I've handled the exception it should technically proceed forward. When file1 doesn't exist, it's exception is always handled but an error always pops up in the file2 part. Sub testing()...
  17. T

    Always evaluate last row of data

    Assume I have some data on Sheet1 as follows: Apples Apples Oranges Pineapples Peaches Coconuts Using the code below, the last row evaluates to 6, correctly: Public Function LRow(ByRef wks As Worksheet) As Long On Error GoTo Correction With wks...
  18. O

    VBA requirement for searching string that begines with...

    Hey all, In need of a simple code that will search string in Column A that begins with "BEL" . Once searched goto target.row. Will appreciate any help. Thank you.
  19. D

    Help Modifying VBA

    Hey All, I have a few reports that i inherited and i need to change the code a bit.. Right now it tells excel that if the date is double clicked that it will run the macros and drop the data specific to that date. I am looking to change this to automatically look for the first empty cell is...
  20. E

    OnError Resume Next after autofilter

    Hi all, I'm trying to handle an event with an on error line but it seems to be skipping it. I've checked my options and it's still set to only break on unhandled errors so I'm not sure what's causing it. My main aim is to filter a bunch of data and delete the visible rows, on occasion the value...

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