简体   繁体   中英

Excel 2016 VBA - Slow performance

Our company recently upgraded to Office 2016 and a lot of people in the office are experiencing very slow calculation speeds (like 1%/s if their lucky).

I have tried restarting, repairing Office, removing the add-ins, etc. I narrowed it down to a file having VBA in it. For example, I created two files: both have two columns of 10k observations of hard-coded numbers and one calculated column. The only difference is that file #1 uses a predefined formula (below) while file #2 uses a UDF (below) and is saved as .xlsm instead of .xlsx.

File #1 (.xlsx)

C1 = 100 * A1 + B1

File #2 (.xlsm)

C1 = UDF(A1, B1)

Where UDF is defined as:

Function UDF(x, y)
  UDF = 100 * x + y
End Function

Are there any steps I can try to fix this issue? Not everyone is experiencing it either. I've sent the VBA file around and for those that it calculates fast (ie instantaneously) I had them screenshot their VBA references but they are the same as what I have.

If starting Excel in Safe Mode cures the problem, it has to be down to an add-in or startup file - or some combination of them. Disable them all and see if that fixes it, then you can re-enable one by one to try and narrow down the culprit.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM