Wednesday, August 5, 2009

Creating Button on Excel and attaching it with macro

Hi guys,

This is how you can create the button on excel and associate it with the macro you have wrote

For Excel 2003
step 1: Go to view
step 2: In Excel 2003 and in earlier versions of Excel, click Option Button on the Forms toolbar, and then draw the outline of the button on the sheet.

For Excel 2007
Step 1:Click the Microsoft Office Button, and then click Excel Options.
step 2: Click the Customize category, select All Commands in the Choose commands from list, select Option Button (form control), and then click OK.

Following Steps are similar in both versions
Step 3: Select any cell in the worksheet.
Step 4:In versions of Excel that are for Microsoft Windows, right-click the option button, and then click Assign Macro.
Step 5:In versions of Excel that are for Macintosh, press COMMAND while you click or press CTRL while you click, depending on your operating system version. Then, click Assign Macro.
Step 6: In the Assign Macro dialog box, click the name of the macro that you want to assign to the option button, and then click OK.

Now that we have learnt how to create a macro and assign it to a button on excel from next blog I will start giving small tips in the form of code snippets.

Let me know if there is anything specific that you want me address @ kashiwar.h@gmail.com

Take care,
Himanshu

1 comment:

  1. keep up ur good wrk on excel macros going. i also was into it 2 yrs back now i have forgoten most of it but as and when i revise it i shall let u knw

    ReplyDelete