Excel.EXE has generated errors and will be closed by windows

kluitna

Board Regular
Joined
Mar 10, 2002
Messages
75
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
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,216,415
Messages
6,130,477
Members
449,583
Latest member
CatMama9

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