List Object Control Events

Table 7.2 shows the events that are available for a ListObject control in VSTO. Table 7.2. Events of the ListObject Control Table 7.2. Events of the ListObject Control Raised when a user attempts to add a new row to a data-bound ListObject. This event is not raised when a new row is programmatically added to the ListObject, only when the user interface is used to add the row. Raised when the ListObject control is double-clicked. The BeforeDoubleClick event handler of a ListObject control...

Exploring Solution Explorer

2006 Passat Abs Fuse Location

Visual Studio projects are displayed and managed in a window called Solution Explorer. Solution Explorer acts as a container for all the items in your solution. For example, the solution might contain multiple projects, and each project might contain multiple items such as code files, Windows forms, or resources. When you create a VSTO solution, Visual Studio automatically creates a project for the solution, along with a default set of associated items. For example, when you create an Excel...

Creating an Interop Excel Application

To create the sample Excel application, which calculates the distance between two points in two-dimensional space, you will use a user defined function written in VBA. 1. Open a new Excel document, and save it as CalculateDistance.xls to a location of your choice. 2. Create the spreadsheet shown in Figure 12.8. JI > - I Z - Ii 100 B Get Work Items i Pubtsh Refresh Configure List D j M B Figure 12.8. Calculating the distance between two points Figure 12.8. Calculating the distance between two...

Converting a Recorded VBA Macro to Visual Basic in VSTO

In this section, you will record a simple macro in VBA and then convert the code to Visual Basic 2005. This example is similar to the one in Chapter 6 in that you will record a macro that sets the selection to bold and italic. However, there isn't any toggle enumeration available in Excel that is similar to Word's wdToggle enumeration. Using Excel, you must write additional code to apply and remove the bold and italic formatting. 1. Open an Excel workbook outside Visual Studio, and type some...