Ok, well, I have a macro for importing text file to my excel
spreadsheet. Instead of adding a button to the toolbar for running this
macro (short cut to this macro), how can I create one command button
(from Control Toolbar) on the spreadsheet itself to run this macro?
rubberband a rectangle on the sheet where you want the button
Double click on the button
In the resulting code
Private Sub Commandbutton1_click()
End sub
Add you macro name
Private Sub Commandbutton1_click()
OpenTextFile
End sub
assumes your macro is named OpenTextFile
go back to the worksheet and on the control toolbox toolbar, take the sheet
out of design mode (click the upper left button on the toolbar so it doesn't
appear depressed).
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.