修复 Windows 10 Excel 2013 Build 9926 查找和替换冻结错误

Fix for Windows 10 Excel 2013 Build 9926 Find and Replace freeze bug

对于我在 Excel 2013 Windows 10 Enterprise Technical Preview Build 9926 中遇到的以下错误,有没有人有更好的修复方法。

问题发生在尝试运行“查找和替换”时。

1.  Open a new workbook
2.  Type ‘Test’ into Cell A1
3.  Press ‘Ctrl+F’
4.  Click the ‘Replace’ tab
5.  Fill in ‘Find What’ with ‘Test’
6.  Fill in ‘Replace with’ with ‘ATest’
7.  Click ‘Replace All’
8.  Enjoy the freeze
9.  Click Ctrl+Alt+delete
10. Click ‘Task Manager’
11. Navigate to ‘Excel -> Find and Replace’
12. Right click ‘Find and Replace’ and click ‘Bring to front’
13. You now read the prompt saying ‘All done. We made 1 replacement’ (this step isn’t necessary but gives you your feedback prompt)
14. Right click ‘Find and Replace’ and click ‘End Task’
15. The task is now killed and you can go back to what you were wanting to do after the find and replace

我已经解决了这些步骤,这样我就不必在 Excel 上“结束任务”,如果我在查找和替换之前没有保存,那会让我失去所有工作。

如果有人对此有更好的修复,请分享,否则它可能只是一个需要修复的错误。

如果使用 VBA 替换命令会怎样?这不会给您提示,因此它可能是一个可行的替代品。

Cells.Replace "Test", "ATest"

也许先做个测试让它更健壮:

If Selection.cells.Count > 1 then
    Selection.Replace "Test", "ATest"
Else
    Cells.Replace "Test", "ATest"
End if

这样,如果您有一个选择并且 运行 它只会 运行 在选择上,如果没有选择那么它会 运行 在 sheet.

在您的子上下文中,它看起来像这样:

Sub find_and_replace_fix()
    Dim sFind As String, sReplace As String
    sFind = InputBox("Find what?")
    sReplace = InputBox("replace with")
    If Selection.Cells.Count > 1 Then
        Selection.Replace what:=sFind, Replacement:=sReplace, SearchOrder:=xlByColumns, MatchCase:=True
    Else
        Cells.Replace what:=sFind, Replacement:=sReplace, SearchOrder:=xlByColumns, MatchCase:=True
    End If
End Sub

如果您愿意,您也可以更深入地检测所选标签。