how to create a command button, then assign macro to it in excel

K

kshaheen

i want to know how create a command button in a cell in the excel sheet
and then how to assign a macro to the created command buttton so that the
macro will run once i click on the command button ?

another question:
is there any sites available on the internet where i can have online free
training on the office components ( word , excel , powerpoint , access ,
outlook) ?
 
P

Peo Sjoblom

View>toolbars>forms and click the button and then click on the sheet, then
you'll get prompted to assign a macro

--
Regards,

Peo Sjoblom

(No private emails please)
 
W

William Benson

I have never been able to get a button INTO a cell because a cell is a range
object and you cannot really fill it with a button. But I can draw a button
in the SAME PLACE as the cell and make sure I have set the 'move but don't
size with cell' checkbox in the properties tab after right-clicking the
button and selecting Format Control).

When you double-click the button in design mode (a button on the visual
basic tool bar turns on design mode if it is not already on -- remember to
turn it off or the button cannot be clicked later) it should open to its
click event in the VB editor. Here you can call the macro (hopefully a Sub
in the same workbook, sometimes I cannot figure out how to call subs in
other workbooks even though I understand the Syntax to be like
Application.Run "OtherWorkbook!MacroName").
 
Top