Hey everyone,
Im having what I believe to be a timing error with my macro.
Sub Run()
' Keyboard Shortcut: Ctrl+Shift+Z
Dim x As Integer
x = 5
While Cells(x, 4) <> ""
Cells(x, 4).Select
Selection.Hyperlinks(1).Follow
Application.Wait Now + TimeValue("00:00:03")
SendKeys "^a"
SendKeys "^c"
SendKeys "^w"
Sheets.Add After:=Sheets(Sheets.Count)
Application.Wait Now + TimeValue("00:00:03")
SendKeys "^v", True
ActiveSheet.Name = Range("A7").Value
Range("C9").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1").Select
x = x + 1
Wend
End Sub
The Macro works fine until I get to "Sendkeys "^v"" the macro takes too long to paste the information and before its done pasting it jumps to the next line.
Ive tried having the macro wait, but it doesn't finish pasting in time, regardless of the wait time.
Does anyone know how I can get the macro to run the next lines of code After the paste has been completed?
Bookmarks