View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
sebastienm sebastienm is offline
external usenet poster
 
Posts: 694
Default using xlDialogChartSourceData

Hi,
I believe showing xlDialogChartSourceData requires a chart to be selected.
Is it your case?
If you want to select a range indepenmdently from a chart, ie in a general
case, use the InputBox from the Application object with Type:=8 for range
(see online help):

Sub test()
Dim rg As Range

On Error Resume Next
Set rg = Application.InputBox(prompt:="Select a range",
Title:="Selector", Default:=Selection.Address, Type:=8)
If Err < 0 Then ' Cancel was pressed, no range selected
MsgBox "no range selected"
Else
MsgBox "User selected: " & rg.Address
End If
End Sub

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Jeff" wrote:

Hello all,
I need the user to be able to select a cell/range. I would like to use the
built-in dialog xlDialogChartSourceData, however only recieve error messeges.
The MS Documentation states that there are no paramaters required to call
it, however I am having no luck at all. I know that I can use my own form
with a RefEdit control, however I would like ot minimize the number of forms
in my app.

Anyone have any luck with this dialog??

Any help appreciated.

Jeff