This is the error message I receive when ever I run this macro:
Application.ScreenUpdating = False
Dim Itemnum As String
For i = 2 To 500
Itemnum = Worksheets(1).Cells(i, 1)
If Itemnum = blank Then End
Sheets(2).Select
Sheets(2).Copy After:=Sheets(i)
Sheets(i + 1).Select
Sheets(i + 1).Name = Itemnum
Worksheets(1).Select
Range("n1:n2").Select
Selection.Copy
Sheets(i + 1).Select
Range("c6").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Worksheets(1).Select
Worksheets(1).Cells(i, 1).Select 'copy Item Number From List Sheet
Selection.Copy
Sheets(i + 1).Select
Range("c9").Select 'Paste Item Number to Item List Sheet
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Next i
Sheets(3).Select
Range("a1").Select
End Sub
As soon as "i" goes above 50 everything stops and that message is displayed. This is related to my earlier post excel 97 bugs. does anyone out there have any idea why excel is choking on this. This is teh first time I have had a problem like this.
Any help would be much appreciated.
Paul
Application.ScreenUpdating = False
Dim Itemnum As String
For i = 2 To 500
Itemnum = Worksheets(1).Cells(i, 1)
If Itemnum = blank Then End
Sheets(2).Select
Sheets(2).Copy After:=Sheets(i)
Sheets(i + 1).Select
Sheets(i + 1).Name = Itemnum
Worksheets(1).Select
Range("n1:n2").Select
Selection.Copy
Sheets(i + 1).Select
Range("c6").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Worksheets(1).Select
Worksheets(1).Cells(i, 1).Select 'copy Item Number From List Sheet
Selection.Copy
Sheets(i + 1).Select
Range("c9").Select 'Paste Item Number to Item List Sheet
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Next i
Sheets(3).Select
Range("a1").Select
End Sub
As soon as "i" goes above 50 everything stops and that message is displayed. This is related to my earlier post excel 97 bugs. does anyone out there have any idea why excel is choking on this. This is teh first time I have had a problem like this.
Any help would be much appreciated.
Paul