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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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) ?
 
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)
 
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").
 
i have tried this, but not succeed please explain again.
may be some version problem
 

Ask a Question

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.

Ask a Question

Back
Top