Adding a Button to start command

%3CLINGO-SUB%20id%3D%22lingo-sub-2224961%22%20slang%3D%22en-US%22%3EAdding%20a%20Button%20to%20start%20command%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2224961%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20added%20a%20button%20to%20a%20spreadsheet%20using%20the%20developer%20tab.%20I%20want%20it%20to%20start%20the%20command%20Data%26gt%3BGet%20External%20Data%26gt%3BFrom%20Text.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIm%20using%20a%20button%20instead%20of%20the%20Ribbon%20to%20make%20it%20more%20user%20friendly%20for%20an%20older%20person%20to%20use.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20do%20I%20allow%20the%20button%20to%20run%20this%20command%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20Regards%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMark%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2224961%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2227690%22%20slang%3D%22en-US%22%3ERe%3A%20Adding%20a%20Button%20to%20start%20command%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2227690%22%20slang%3D%22en-US%22%3EThis%20is%20the%20line%20of%20code%20that%20starts%20the%20Get%20%26amp%3B%20Transform%20text%20import%20wizard%3A%3CBR%20%2F%3EApplication.CommandBars.ExecuteMso%20%22GetPowerQueryGetTransformDataFromText%22%3CBR%20%2F%3Ebut%20I%20doubt%20if%20that%20is%20what%20you%20are%20looking%20for.%20More%20likely%20you%20need%20this%20one%3A%3CBR%20%2F%3EApplication.CommandBars.ExecuteMso%20%22GetExternalDataFromText%22%3C%2FLINGO-BODY%3E
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

 

Mark

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"