question

SHENJian-1041 avatar image
0 Votes"
SHENJian-1041 asked SHENJian-1041 commented

Crash problem when using VBA in Excel

To whom it may concern

On 27th May, I updated my windows version. Since then, every time I run VBA, my desktop will crash.

I have tried several methods, including restoring office and uninstall windows updates, but all of my efforts failed. I have tried both office 2016 and office 365, but it doesn't help.

I have tried to use safe mode for excel. However, this problem still exists.

I have no System Restore point before.

Here is the information for my computer.

VBA code: (To paste values rather than formulas)
Sub pub_选择性粘贴数值或文本()
' 数值及数字格式
' 快捷键: Ctrl+e
On Error Resume Next
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats
ActiveSheet.PasteSpecial Format:="文本"
End sub

My computer:
设备名称 sj-PC
CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz 1.80 GHz
RAM: 8.00 GB
版本 Windows 10 家庭中文版
版本号 21H1
安装日期 ‎2021/‎3/‎12
操作系统内部版本 19043.985
体验 Windows Feature Experience Pack 120.2212.2020.0

My windows have been updated to the latest version, 21H1.

Thanks for your help to check what's wrong when I use VBA. I know it must be due to windows update.

Yours Sincerely
Jian Shen

office-vba-dev
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, I changed the tag to office-vba-dev this is a way for Office developers ask question. The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

0 Votes 0 ·

Thanks for your help.
In fact, I'm very confused about which tag I shall use at the beginning.

0 Votes 0 ·

1 Answer

SHENJian-1041 avatar image
0 Votes"
SHENJian-1041 answered

I need to add more conditions.
Only when I split the screen, and use VBA code to copy and paste values rather than formulas from one excel to another, will this problem occurs.
Please help to check it out.

Your Sincerely
Jian Shen

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.