loop error

  1. andrewb90

    Error at end of loop

    I have this code that deletes objects all with the same name, but once it gets to the end I get an error. Is there a way to either: A - stop the error from popping up at the end of the code. or B - Just have the code fade and delete all the objects at the same time Do While...
  2. K

    Loop creating new Workbooks, need to Save As and continue Loop

    Hello, My macro was built to loop through data of an original workbook and break out the data into individual workbooks based on the value of one field. The code works perfectly for creating the workbooks but I can not figure out how to get each workbook to save and continue on to the next. It...
  3. M

    Do Until IsEmpty Looping Issue

    Excel 2003. I believe I've got everything working in the code up until: If rnGx = rnGy Then It loops once and then "Run-time error '424': Object Required" for the code above. Sub test1() Dim rnGx As Range Dim rnGy As Range Dim i As Long Dim xNum As Integer Dim yNum As...
  4. M

    How can i skip empty cells with this loop

    im trying to work on a simple program that it will highlight all cells with a value of 5 or less and VB is not my strong point. The problem is it highlights a million cells in the column because empty is less than 5. this is the code I'm using. I fumbled through forums for a day to get this...
  5. T

    VBA: Loops appear to work in debugging, but only partial results appear

    Hi all, I have a macro which contains three nested 'for' loops. Stepping through the code they all appear to work as normal, but when I run the macro the results stop halfway. I have been poring over the code for hours and cannot see why for the life of me. If anyone can spot an error or might...
  6. T

    If then else compile error: Else without If

    Hi all- I'm trying to run a simple loop and I keep getting "compile error: Else without if" that doesn't make sense to me. Basically I'm checking a range for formulas and if there is a formula, I'll skip that cell. If the cell is blank, I'll enter a formula in an adjacent cell. Any help...
  7. S

    loop not changing values

    I want to look at a list of dated files and open them in order. below is my code. Dim loopcounter As Integer Dim rptdate As Date Dim datafilename As String Dim datafilelocation As String Dim fulldatafilename As String Dim fulldatafilelocation As String rptdate =...
  8. E

    for next loop problem

    Yet another up date can some one please tell me how I change this code so that when the conditions in each section of the if else block are satisfied that the “next” can see the “For” and not report the next without for if I can get this sorted then just maybe the other post will be come...
  9. X

    help with bug in vb code...

    Hi Everyone, Im using the following code to insert multiple data in a single cell. For example: I choose a from a drop-down list (data validation cell) and it inserts the clicked item in the same data validation cell. '------------------ Data Validation add in same cell...

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