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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,785
Messages
5,833,693
Members
430,224
Latest member
Tirrazo

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
Top