Adding a Button to start command

Occasional Visitor

I have added a button to a spreadsheet using the developer tab. I want it to start the command Data>Get External Data>From Text.


Im using a button instead of the Ribbon to make it more user friendly for an older person to use.


How do I allow the button to run this command?


Kind Regards



1 Reply
This is the line of code that starts the Get & Transform text import wizard:
Application.CommandBars.ExecuteMso "GetPowerQueryGetTransformDataFromText"
but I doubt if that is what you are looking for. More likely you need this one:
Application.CommandBars.ExecuteMso "GetExternalDataFromText"