Professional Excel Development [Electronic resources] : The Definitive Guide to Developing Applications Using Microsoft® Excel and VBA® نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Professional Excel Development [Electronic resources] : The Definitive Guide to Developing Applications Using Microsoft® Excel and VBA® - نسخه متنی

Stephen Bullen, Rob Bovey, John Green

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید











Managed Excel Add-ins


The Visual Studio Tools for Office provides a document-centric mechanism for automating Excel. By that, we mean the code is linked to workbooks and not the application itself. In contrast, COM Add-ins are application-centric, because they link to the application directly. It is somewhat complicated (but possible and beyond the scope of this book) to create COM Add-ins using VB.NET, but we can achieve the goal of application-centric code much easier by saving a managed workbook as a normal Excel add-in. Unfortunately, the VSTO template does not enable us to create an Excel add-in solution directly and only enables us to launch xls files during debugging, but everything works as expected if we just save the xls as an add-in after we've finished development.

The Paste Special Bar VSTO Add-in


In Chapter 8 Advanced Command Bar Handling, we created a Paste Special Bar Excel add-in that added command bar buttons for each of the Paste Special options. In Chapter 21 Writing Add-ins with Visual Basic 6, we converted the example to a COM Add-in. We have also converted it to a VSTO add-in, which can be found on the CD in the \Concepts\Ch22Using VB.NET and the Visual Studio Tools for Office\PasteSpecialBarVSTO folder. The VSTO solution was created by starting with a standard VSTO workbook, copying the code from the VB6 COM Add-in, then getting it to work in VB.NET. There were very few changes required, all of which are documented in the READ_ME module contained in the project and each procedure header. The only complicated part of the conversion was the code required to obtain an IPicture interface for an image contained in a .NET resource file, which is documented in an MSKB article at [ http://support.microsoft.com/?824017 ]. You might like to open all three versions of the add-in to compare their differences and note that most of the code is exactly the same in each.


/ 225