VBA input box


Posted by matt on October 17, 2001 3:53 AM

i need a macrow so that when i have selected a a cell a in put box will apire with the name of the field heding in the promt or titel. the feiled well be a variable and so will the cell selected.



Posted by Juan Pablo on October 17, 2001 7:22 AM

Try this.

It goes in your worksheet code module

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Ans = InputBox(Target.Address, Target.End(xlUp).Value)
MsgBox Ans
End Sub

Juan Pablo