Selececting a cell/range onscreen through vba
Hi Ken,
Thanks a lot
Reza
here is a trivial example of code that prompts the user to select a
range of cells for processing. If a new range of cells is not selected
when prompted the current selection is the default range that is
processed...
Public Sub ChosenCells()
Dim rngWhatCells As Range
On Error GoTo CANCELLED
Set rngWhatCells = Application.InputBox( _
Prompt:="Select Cells for processing.", _
Title:="What Cells?", _
Default:=Selection.Address, _
Type:=8)
rngWhatCells.Value = "I'm a chosen cell"
CANCELLED:
End Sub
Ken Johnson
|