EXCELSHEET 中"输入”或“编辑”状态与“就绪”状态的切换

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub Macro1()
Dim i As Integer
For i = 1 To 5
Sheet1.Range("D10").Select
ActiveCell.Activate
SendKeys " "
Sleep 1000
DoEvents
SendKeys "{enter}"
Sleep 1000 '可以看到动态改变的效果
DoEvents
Next
End Sub

你可能感兴趣的:(Excel)