Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get the follow error
Run-Time error '1004' Select method of Range class failed. In highlights this line, which is toward the end of the code. Sheet1.Range("A" & found & ":I" & found).Select There is the code for the button. Private Sub DeleteProdType_Click() test_row = 2 test_value = Sheet1.Range("A" & test_row).Value While test_value < "" If test_value = UserForm1.ComboBox2.Value Then found = test_row GoTo leaveloop1 End If test_row = test_row + 1 test_value = Sheet1.Range("A" & test_row).Value Wend leaveloop1: test_row2 = 1 test_value2 = Sheet2.Range("A" & test_row2).Value While test_value2 < "" test_row2 = test_row2 + 1 test_value2 = Sheet2.Range("A" & test_row2).Value Wend Sheet1.Range("A" & found & ":H" & found).Copy Sheet2.Range("A" & test_row2).PasteSpecial Sheet2.Range("I" & test_row2) = Date UserForm1.ComboBox2.Clear Sheet1.Range("A" & found & ":I" & found).Select Application.CutCopyMode = False Selection.Delete Shift:=xlUp ComboBoxRefresh End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run Time Error 1004: Application or Object Defined Error | Excel Programming | |||
Run Time 1004 Error: Application or Object Difine Error | Excel Programming | |||
Run time error 1004, General ODBC error | New Users to Excel | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Run time error '1004': Generaol ODBC error | Excel Programming |