Sub With_InputBox()
Dim myRange As Range
Dim myCell As Range
Dim myAns As Variant
Set myRange = Range("a1,b3,d7")
For Each myCell In myRange.Cells
myAns = InputBox _
(prompt:="Please enter something for cell: " _
& myCell.Address, Title:="Get Data")
If myAns <> "" Then
myCell.Value = myAns
End If
Next myCell
End Sub
|