I can't think how/why that command would generate a selection dialog.
Without knowing what you've done it's hard to guess what to suggest.
The first part of How to add buttons from this forum to your toolbars is a refresher on what to do with the command, if you need it.