none
How to show select data source dialog on a chart using vba RRS feed

  • Question

  • In my addin, I use vba to create a chart. I want to show select data source dialog in my code, but I can't find API

    How can I do this by code?

    Thursday, December 8, 2016 3:18 AM

Answers

  • Hi,

    Do you create the chart in VBA and then call it in a document-level customization using Application.Run("Macro")?

    You could use the code below to show Select Data Source dialog.

    ActiveSheet.ChartObject(1).Select
    Application.Dialogs(xlDialogChartSourceData).Show

    You use Dialog.Show Method (Excel) to show the built-in dialogs and you could find the lists in Built-In Dialog Box Argument Lists

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by ChDw Monday, December 12, 2016 8:23 AM
    Friday, December 9, 2016 9:44 AM
    Moderator