1) Open the worksheet where you want to add an ActiveX control
(ActiveX control: A control, such as a check box or button that offers options to users or runs macros or scripts that automate a task. You can write macros for the control in Microsoft Visual Basic for Applications or scripts in Microsoft Script Editor.).
2) Display the Control Toolbox: point to Toolbars on the View menu, and then click Control Toolbox.
3) Click the control you want to add.
4) Click on the worksheet at the location where you want to place the control.
5) Drag the control to the size you want.
6) If you're adding a check box, text box, command button, option button, list box, combo box, toggle button, or label, enter the text you want to appear on the control.
How?
(Right-click the control.
Point to the name of the object on the shortcut menu (for example, CheckBox Object).
Click Edit.
Edit and type the text.
When you're finished, press ESC.
7) Set the properties you want for the control: right-click the control, and then click Properties on the shortcut menu.
For information about the properties, press F1 in the Properties dialog box to display the Microsoft Visual Basic Help for Microsoft Forms.
8) Do one of the following:
<> Add Visual Basic macro code for a control to be used in Excel
(Right-click the control, and then click View Code on the shortcut menu.
In the Visual Basic Editor, write your macro code.
For information about writing macro code, see Visual Basic Help.
To quit, click Close and Return to Microsoft Excel on the File menu.)
<> Add a Web script for a control to be used on a Web page
(Click the worksheet anywhere within the data that will go on the Web page.
On the Tools menu, point to Macro, and then click Microsoft Script Editor.
In the Script Editor, write your script, using the control ID to handle events for the control.
For information about developing Web scripts, click the option you want on the Help menu in the Script Editor window.
To return to Excel from the Script Editor, click Exit on the File menu.)
9) To quit design mode and enable the ActiveX control, click Exit Design Mode
2006-06-17 23:49:10
·
answer #1
·
answered by eddygool 5
·
3⤊
0⤋
Add the Sub
Private Sub Workbook_Open()
End Sub
to the vb code for THIS workbook
---------
record a macro while adding a check box to your form. stop recording the macro and insert the genrated code into the workbook open sub.
You should put the code between an if statement to make sure that it doesnt add the checkbox every time someone opens the document after they saved it. if they save with the checkbox there, when they open it again Excel will make another thus you must check for existance.
2006-06-18 00:13:08
·
answer #2
·
answered by jason b 5
·
0⤊
0⤋