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

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
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,215,003
Messages
6,122,655
Members
449,091
Latest member
peppernaut

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