Designing the Add-In

You notice how the IDE embeds a fully functional instance of Microsoft Excel in the designer. This is useful because you can drag and drop Windows Forms controls from the toolbox onto the document’s surface. The goal of the example is to provide controls for filtering a list of orders. So in the first row add the following columns titles: Order ID, Ship Country, and Shipped Date. Next, add the fictitious orders information listed in Table 52.1 according to the column titles.

Table 52.1 Populating Orders Information

image

Now select the cell range from A2 to C5 and name the range as Orders. The next step is to add a TextBox named FilterTextBox whose Text property is Type your filter here; the last step is to add a Button named FilterButton and whose Text property is Go Filter!. The result of the previous listed steps is shown in Figure 52.9.

Figure 52.9 Design-time customizations onto the Excel document within Visual Studio.

image

When controls are available over the document’s surface, it’s time to start writing some Visual Basic code to make it alive.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.170.174