Discussion Locked
0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do you get a macro in VBA to pause for data entry? I tried to record a macro that moves from the first cell requiring data through the last cell that requires data. However it doesn't interpet my input as a pause for data entry {?}. Instead, when the macro is run, the cursor moves from the first cell to the next until it reaches the last cell and the macro terminates.
2 replies
by dklippert
Here's a macro i picked up somewhere:
Sub EnterRows136()
Dim i As Variant
Dim myCol As Long
Dim myArray As Variant
Dim myResponse As Variant
myArray = Array(1, 3, 6)
myResponse = vbYes
myCol = ActiveCell.Column
While myResponse = vbYes
For Each i In myArray
Cells(i, myCol).Value = _
Application.InputBox("Enter value for Row " & i & " of Column " & _
Mid(Cells(i, myCol).Address, 2, InStr(2, Cells(i, myCol).Address, "$") - 2))
Next i
myCol = myCol + 1
myResponse = MsgBox("Continue?", vbYesNo)
Wend
End Sub
by audit
Poster rated this answer
This discussion is closed to new replies.
Trending Software posts
Sort by Trending
Discussion
Network Printer Works for Everyone Except Me
0 helpful
10 replies
0 helpful
4 replies
Discussion
Is There any Reverse Video Search Tool
0 helpful
8 replies
Discussion
Useful software Tip or Shortcut
0 helpful
0 replies
Discussion
Hello everyone
0 helpful
1 reply