I'm trying to rewrite some VBA code in Excel VSTO.
The VBA code is as follows:
Application.Dialogs(xlDialogSort).Show
When I try to do the same in VSTO I find that the same method needs 30 arguments! The signature is "Show(object Arg0,object Arg1, etc.)"
Globals.RiskViewerWorkbook.ThisApplication.Dialogs[XlBuiltInDialog.xlDialogSort].Show(null,null,null,... );
What values do I need to pass to make the same call as the VBA code is using? null does not work.
I started writing this question and then discovered the answer so I'll post it and an answer.