SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 301 | Next

Jim DeMarco

"Pro Excel 2007 VBA"


3. From the Manage drop-down list, choose COM Add-Ins, and then click the Go button.
4. Deselect the NWindDataAddIn project, as shown in Figure 9-20.
Figure 9-20. Unloading an add-in
5. Click OK to unload the add-in.
6. Close the workbook without saving.
7. Close Visual Studio 2005.
CHAPTER 9 n ACTIVEX AND .NET 341
Creating a Custom Task Pane and Data Input Form Using .NET
In this example, we??™ll look at a .NET project that creates a custom task pane and a simulated
Excel UserForm. A task pane is a window that anchors itself to the right of an Office application
and contains commands to perform various functions. A common Office task pane is the
Getting Started task pane, shown in Figure 9-21.
Figure 9-21. Getting Started task pane in Excel 2003
Our example task pane will contain commands used by a human resources department to
enter new hire information and send that information to other groups for processing.
Creating the HR Task Pane Add-In
To begin, we??™ll need to add a couple of new items to our add-in project: a user control that will
contain the task pane and a Windows form to act as our Excel 2007 UserForm.
1. Open Visual Studio 2005.
2. From the start page, create a new Microsoft Excel Add-in project.
3. Name it UserFormAddIn.
4. Add a new user control to the project by selecting Project ?¤ Add User Control.
5. In the Add New Item dialog box, name the user control HRTaskPane.vb.
6. Add a new Windows form to the project by selecting Project ?¤ Add Windows Form.


Pages:
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313