Public Sub StupidSendKeys()
Dim mywaittime As Single
mywaittime = 2.5
Dim cmt As Comment
Dim i As Integer
Set cmt = ActiveCell.Comment
For i = 1 To 20
If cmt Is Nothing Then
SendMyKeys ("A")
PauseSec (mywaittime)
SendKeys "{ENTER}"
End If
If i = 18 Then
i = 1
End If
Next i
End Sub
Public Sub SendMyKeys(ToSend As String)
Application.SendKeys ToSend, True
End Sub
Public Sub PauseSec(TimePause As Single)
Dim OpenFiles As Long
Dim x As Single
x = Timer
OpenFiles = DoEvents()
While Timer - x < TimePause
Wend
End Sub
No comments:
Post a Comment