Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Issues with Looping macro...Do Until TextBox7.Value = 0 but it's crashing...Why?
The code below is my attempt at getting the macro to run the code
below with the "DO" command until TextBox7.Value = 0, however, I am getting error messages saying "Loop without DO" or when I switch them it says "DO without Loop". Any ideas as to what the heck is wrong with this macro? Your help is much appreciated! Thanks! -Todd '======================== Do '======================== If TextBox7.Value 0 Then Sheets("export").Select TextBox5.Value = Sheets("export").Range("GX1").Value TextBox6.Value = Sheets("export").Range("HB1").Value TextBox7.Value = Sheets("export").Range("HE1").Value TextBox11.Value = Sheets("EXPORT").Range("HH1").Value TextBox10.Value = Sheets("EXPORT").Range("HK1").Value TextBox9.Value = Sheets("EXPORT").Range("HN1").Value TextBox8.Value = Sheets("EXPORT").Range("HQ1").Value TextBox13.Value = Sheets("EXPORT").Range("HT1").Value TextBox12.Value = Sheets("EXPORT").Range("HW1").Value Range(TextBox6.Value).Select ActiveCell.FormulaR1C1 = TextBox7.Value Range(TextBox6.Value).AutoFill Destination:=Range(TextBox5.Value) If TextBox13.Value = 0 Then Unload Me UserForm1.Show End If If TextBox13.Value 0 Then Sheets("export").Range("IB3").Select ActiveCell.Value = ActiveCell.Value + 1 Range(TextBox13.Value).Select ActiveCell.Value = "X" Range("A1").Select Unload Me UserForm1.Show End If If TextBox7.Value = 0 Then MsgBox "Last Value Already Inserted", vbCritical, "- No More Data to Insert -" Exit Sub End If '======================== Loop Until TextBox7.Value = 0 '======================== End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Crashing Macro, Not Enough Memory | Excel Programming | |||
Help with a crashing Macro needed | Excel Programming | |||
Macro crashing on different computer | Excel Programming | |||
Macro Crashing Excel | Excel Programming | |||
Looping Macro | Excel Programming |