简体   繁体   中英

Excel VBA: how to programmatically remove the marching ants after range.copy

我不想诉诸 SendKeys "{ESC}"

application.cutcopymode = false

Try this code as an example. The key line is ' Application.CutCopyMode = False '

Sub Test()
    Range("A1").Copy
    MsgBox "View Marching Ants"
    Range("A2").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
End Sub

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