Even if it seems obvious, let me just indicate that you will then be able to
use the range for further actions before the "Exit Sub", eg:
Dim MyRangeRef As Range
On Error GoTo Select_Cncled
Set MyRangeRef = Application.InputBox("Select the range of cells",
"Reference?", , , , , , 8)
MsgBox MyRangeRef.Cells.Count
'do other stuff
'etc.
Exit Sub
Select_Cncled:
MsgBox "you cancelled the previous message, you naughty!"
HTH
Cordially
Pascal
"papou" <(E-Mail Removed)> a écrit dans le message
de news: %(E-Mail Removed)...
> Hello Ian
>
> Use Application.Inputbox:
>
> Dim MyRangeRef As Range
> On Error GoTo Select_Cncled
> Set MyRangeRef = Application.InputBox("Select the range of cells",
> "Reference?", , , , , , 8)
> Exit Sub
>
> Select_Cncled:
> MsgBox "you cancelled the previous message, you naughty!"
>
> HTH
> Cordially
> Pascal
>
> "ian" <(E-Mail Removed)> a écrit dans le message de news:
> (E-Mail Removed)...
>>I like a macro which gives me control to select a range in a worksheet
>> manually, then continues with the macro.
>>
>> I'd hoped to have a message box with something like "Select the range
>> to process" which I select off the worksheet with my mouse and then I
>> click ok to continue. I've googled and can'd find any pointers.
>>
>> Can anyone help please?
>>
>> Thanks
>>
>
>