[FONT=Courier New][COLOR=darkblue]Option[/COLOR] [COLOR=darkblue]Explicit[/COLOR]
[COLOR=darkblue]Sub[/COLOR] test()
[COLOR=darkblue]Dim[/COLOR] ChrtObj [COLOR=darkblue]As[/COLOR] ChartObject
[COLOR=darkblue]Dim[/COLOR] ChartName [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]String[/COLOR]
ChartName = Application.InputBox( _
Prompt:="Please enter a chart name...", _
Title:="Chart Name")
[COLOR=darkblue]If[/COLOR] ChartName = "False" [COLOR=darkblue]Then[/COLOR] [COLOR=darkblue]Exit[/COLOR] [COLOR=darkblue]Sub[/COLOR]
[COLOR=darkblue]On[/COLOR] [COLOR=darkblue]Error[/COLOR] [COLOR=darkblue]Resume[/COLOR] [COLOR=darkblue]Next[/COLOR]
[COLOR=darkblue]Set[/COLOR] ChrtObj = ActiveSheet.ChartObjects(ChartName)
[COLOR=darkblue]On[/COLOR] [COLOR=darkblue]Error[/COLOR] [COLOR=darkblue]GoTo[/COLOR] 0
[COLOR=darkblue]If[/COLOR] [COLOR=darkblue]Not[/COLOR] ChrtObj [COLOR=darkblue]Is[/COLOR] [COLOR=darkblue]Nothing[/COLOR] [COLOR=darkblue]Then[/COLOR]
ChrtObj.Select
[COLOR=darkblue]Else[/COLOR]
MsgBox "A chart named '" & ChartName & "' does not exist, please try again!", vbExclamation
[COLOR=darkblue]End[/COLOR] [COLOR=darkblue]If[/COLOR]
[COLOR=darkblue]End[/COLOR] [COLOR=darkblue]Sub[/COLOR]
[/FONT]