Dear cride,
1- Create a text file using notepad and enter the following code into it:
(defun ABC()
(sssetfirst nil (ssget "x" (list (assoc 8 (entget (car (entsel)))))))
)
2- Save the file into the AutoCAD "Support folder" with the name "ABC.LSP"
3- Create a text file using notepad and enter the following code into it: (If the file "ACADDOC.LSP" exists in the "Support" folder, append the below code to file and don't do step number 4)
(defun-q s::startup()
(load "abc.lsp")
)
4- Save the file into the AutoCAD "Support folder" with the name "ACADDOC.LSP".
5- Run ACAD.
6- Right click on a toolbar and select the "Customize command from the menu.
7- In the "Customize dialog box activate the "Commands" tab and select the "User defined" item from the list.
8- From the right side drag and drop the "User Defined Button" to outside of dialog box (everywhere).
9- Right click on the new button and select the "Properties" from the menu.
10- In the Dialog box in lower large textbox enter (abc)
11- You can select an image for the button.
12- Click "Apply"
13- Click "OK"

Farzad