paulked
03-13-2009, 07:30 AM
I can only run any of the macro's below once. If I try to run a second time then Excel gives Run-time error '-2147417848(80010108)'
Sub Blem()
Selection.Copy
Sheets("Need").Select
Range("A" & Cells(Rows.Count, "A").End(xlUp).Row + 1).Select
ActiveSheet.Paste
Sheets("Made").Select
Range("A" & BoatReturn.ListBox1.ListIndex + 2).Select
With ActiveCell
Cells(.Row, "B").Select
Application.CutCopyMode = False
Selection.Value = ("BLEM")
End With
'Call SortMade
'Call SortNeed
BoatReturn.Hide
End Sub
Sub Scrap()
Selection.Copy
Sheets("Need").Select
Range("A" & Cells(Rows.Count, "A").End(xlUp).Row + 1).Select
ActiveSheet.Paste
Sheets("Scrap").Select
Range("A" & Cells(Rows.Count, "A").End(xlUp).Row + 1).Select
ActiveSheet.Paste
Sheets("Made").Select
Range("A" & BoatReturn.ListBox1.ListIndex + 2).Select
With ActiveCell
Cells(.Row, "B").Select
Application.CutCopyMode = False
Selection.Value = ("SCRAP")
End With
'Call SortMade
'Call SortNeed
BoatReturn.Hide
End Sub
Sub UK1st()
Selection.Copy
Sheets("Need").Select
Range("A" & Cells(Rows.Count, "A").End(xlUp).Row + 1).Select
ActiveSheet.Paste
Sheets("Made").Select
Range("A" & BoatReturn.ListBox1.ListIndex + 2).Select
With ActiveCell
Cells(.Row, "B").Select
Application.CutCopyMode = False
Selection.Value = ("UK1st")
End With
'Call SortMade
'Call SortNeed
BoatReturn.Hide
End Sub
Any help appreciated
Paul Ked
Sub Blem()
Selection.Copy
Sheets("Need").Select
Range("A" & Cells(Rows.Count, "A").End(xlUp).Row + 1).Select
ActiveSheet.Paste
Sheets("Made").Select
Range("A" & BoatReturn.ListBox1.ListIndex + 2).Select
With ActiveCell
Cells(.Row, "B").Select
Application.CutCopyMode = False
Selection.Value = ("BLEM")
End With
'Call SortMade
'Call SortNeed
BoatReturn.Hide
End Sub
Sub Scrap()
Selection.Copy
Sheets("Need").Select
Range("A" & Cells(Rows.Count, "A").End(xlUp).Row + 1).Select
ActiveSheet.Paste
Sheets("Scrap").Select
Range("A" & Cells(Rows.Count, "A").End(xlUp).Row + 1).Select
ActiveSheet.Paste
Sheets("Made").Select
Range("A" & BoatReturn.ListBox1.ListIndex + 2).Select
With ActiveCell
Cells(.Row, "B").Select
Application.CutCopyMode = False
Selection.Value = ("SCRAP")
End With
'Call SortMade
'Call SortNeed
BoatReturn.Hide
End Sub
Sub UK1st()
Selection.Copy
Sheets("Need").Select
Range("A" & Cells(Rows.Count, "A").End(xlUp).Row + 1).Select
ActiveSheet.Paste
Sheets("Made").Select
Range("A" & BoatReturn.ListBox1.ListIndex + 2).Select
With ActiveCell
Cells(.Row, "B").Select
Application.CutCopyMode = False
Selection.Value = ("UK1st")
End With
'Call SortMade
'Call SortNeed
BoatReturn.Hide
End Sub
Any help appreciated
Paul Ked