Sufiyan97
Well-known Member
- Joined
- Apr 12, 2019
- Messages
- 1,614
- Office Version
- 365
- 2013
- Platform
- Windows
I have below code, which is not working as expected.
What I want is to wait a code for 2 sec before going to another line, but when I run the code, it shows in VBA window as running and does not do anything except when I press "ESC" from keyboard, and code runs in one go without waiting for 2 sec before each line.
What I want is to wait a code for 2 sec before going to another line, but when I run the code, it shows in VBA window as running and does not do anything except when I press "ESC" from keyboard, and code runs in one go without waiting for 2 sec before each line.
VBA Code:
Sub Macro1()
Range("A1").Value = "Name"
Application.Wait "00:00:02"
Range("A2").Value = "A"
Application.Wait "00:00:02"
Range("A3").Value = "B"
Application.Wait "00:00:02"
Range("A4").Value = "C"
Application.Wait "00:00:02"
Range("A5").Value = "D"
Application.Wait "00:00:02"
Range("A1").Select
End Sub