Hi Andy,
I was just about to post I thought Any Pope's suggestion would be perfect
for your needs, I didn't spot that dialog!
I suspect the reason for your error is along the lines of what I mentioned
in my post.
Sub test()
On Error Resume Next
Application.Dialogs(xlDialogGalleryCustom).Show
If Err.Number Then
MsgBox "probably no UD custom charts exist and" & vbCr & _
"therefore neither does xlusrgal.xls"
End If
On Error GoTo 0
End Sub
Regards,
Peter T
"Andy" wrote in message
...
Hi Andy
Unfortunately not, I'm not sure why but I get a run-time error 1004 and
the
message 'Show method of Dialog failed'. I guess this is the dialog box
that
is displayed but might it have to be opened as part of the main chart type
selection dialog rather than just on its own?
Thanks
Andy
"Andy Pope" wrote:
Hi,
Does this builtin dialog help at all?
Application.Dialogs(xlDialogGalleryCustom).Show
Cheers
Andy
Andy wrote:
Hi all
I have a macro that applies a user-defined chart template to a basic
chart.
Ideally I would like to be able to do one of the following:
1. Take a constant/variable that contains the name of the template and
compare this against a list of available user-defined templates to see
if it
exists.
and/or
2. Create a user form (which I think I can do) that is basically a
stripped
down version of the xlDialogChartType dialog box and just contains a
list of
available user-defined templates for the user to select. I would
prefer not
to use the 'official' dialog box as it involves clicking through
several tabs
to get to the user-defined list (unless you can get it to display that
straight away of course)., which may not seem like too much of a chore
but
the users will be running this a lot so it will get frustrating.
Thank you for any help
Andy
--
Andy Pope, Microsoft MVP - Excel
http://www.andypope.info