Excel Crash on Insert Row, and Cut and Paste

Jaamie

Board Regular
Joined
Apr 16, 2003
Messages
224
Office Version
  1. 2016
Platform
  1. Windows
Weeks into a project, all of a sudden VBA cutting a row and inserting it, or even cutting a range of cells and pasting them are both causing Excel to crash. I have created a clean workbook and tried suggestions from searching the web. Nothing works! Stepping thru is fails on the Insert command. In the cut and paste it fails on the Paste. This code has worked in the past.

I am using Office 2016 on Win 10.

This is Function that moves transactions into date order. If I use a test Subroutine that just calls the function; it works.

Any ideas are welcome.
 
Last edited:

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Typically, from my experience, if something that has worked for a while all of a sudden stops working, it is often due to some change in the data file (structure or perhaps size of the data).

With what you give us, there is a little we can do. But if you post your code here, and some sample data, we may be able to help you.
 
Upvote 0
Thank you for the reply. I have a solution but not sure why. The call to the Function was made from several levels down. (ie, Sub, then Function A, Function B, then call to my date move Function) I reordered things and moved it to the top level. Ie A call from a Subroutine. and it worked.

Is there a way to determine how deep the Stack is from within the VBA code?
 
Upvote 0
Is there a way to determine how deep the Stack it from within the VBA code?
I am sorry, but I do not know. I have never seen anything like that, and I have never tried to do anything like that.
 
Upvote 0

Forum statistics

Threads
1,224,880
Messages
6,181,532
Members
453,054
Latest member
ezzat

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