Input box needs cancel macro
Posted by Keith on July 05, 2000 7:34 AM
Help!
Does anyone out there know how to add a "Cancel" way out clause.
The code below works really well except if you try to cancel from the input box the debug screen comes up.
I need a code that will return to say cell "A1" if cancel is pressed.
I've tried but can't get it to work.
Any help would - Help.
Cheers,
Keith. (Code below)
ActiveSheet.DrawingObjects(Application.Caller).Select
ActiveSheet.ChartObjects("Chart 3").Activate
ActiveChart.SetSourceData Source:=Range("i21").Application.InputBox( _
prompt:="Select Source Range for Chart", Type:=8)