Worksheet.Copy crashes Excel

lausianne

New Member
Joined
Oct 8, 2015
Messages
1
Hi,

my VBA script has run for many years with small changes, none recently, and only now I found Excel crashing when running certain operations. It always crashes with no error message when trying to copy a worksheet.
Code excerpt of all lines that contain the sheet:

Code:
...
Public shtModel As Worksheet
...
Set shtModel = ActiveWorkbook.Sheets(strModel)
...
Application.CutCopyMode = False
shtModel.Copy before:=Sheets(1) '<- This is where Excel crashes
...

It does not matter whether I just run the code or step through it. No other AddIn but my own is active. I have no HP printer. (These are three possible reasons for similar crashes I found in other threads.)

This is Excel 2013 on Windows 10. I tried on another PC with the same setup - no problem there. So there must be a difference between the setups, but I don't see it.
I'd appreciate any hint how to find the source of that issue ...

Thank you!
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

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