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

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

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

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











Conclusion


Office 2003 and the Visual Studio Tools for Office should be thought of as a typical Microsoft "version 1.0" product; it does exactly what it has been designed to do, but you might not be the kind of person it was designed for and the design may be too limited for practical use in most common situations. It also lacks many of the ease-of-use features that we take for granted in our VBA projects, such as automatically having class modules for each of our worksheets and automatically having events for any controls we add to them.

You might consider a VSTO solution if all of the following apply:

This is a new application which won't make much use of any VBA code libraries you might have, and

You already have some experience with VB.NET or C# and the .NET framework, and

The .NET framework 1.1 is installed for all users, and

You can administer .NET security policy centrally and roll it out to all users, and

All users have Office 2003 Professional installed, running with U.S. English regional settings, and

You don't need to use any of the features that VSTO doesn't support, such as user-defined functions, OnKey, OnTime and so on, and

You have a central server to host the VSTO assemblies, and

All users will be connected to the central server when using the document; it will not be used outside the company or offline, such as taken home or being shared with a third party.


If you can't tick all those boxes, but still want to use the facilities provided by the .NET framework, consider exposing the managed code as a COM DLL and calling it from VBA.

VSTO 1.0 was designed to bring Office development into the realm of the professional Visual Studio.NET developer. It was not designed to bring managed code development into the realm of the Office power user or VBA developer and doesn't attempt to do so. It is in no way a replacement for VBA, which will continue to be supported for many years to come.

VSTO 2.0 (a.k.a. VSTO 2005) takes a further step away from the average Office user by hosting the Excel window inside Visual Studio.NET and making it behave just like the Windows Forms drawing surface, allowing the .NET developer to drag and drop Windows Forms controls onto worksheets. By forcing Excel to behave in the same manner as other Visual Studio.NET elements, such as Windows Forms and ASP.NET, VSTO 2.0 makes it much easier for the VS.NET developer to embrace Office development, but at the cost of many of the ease-of-use features that Excel end users have come to expect. On the plus side, VSTO 2.0 includes many of the automatic features we take for granted in VBA, such as automatically getting a new event handler class module when we add a worksheet and so forth. It also includes a number of new programming elements, in which the existing Excel events have been wrapped and combined in innovative ways.

This chapter started with the statement that the collision between .NET and Office came relatively late in the Office 2003 planning processfar too late for major changes to be considered. With the planning for Office 12 well under way, it is incumbent upon both the Visual Tools and Office divisions at Microsoft to work hand in hand to bring managed code development within the realm of the traditional Office power user and VBA developer. This must include the ability for the owners of existing VBA applications to migrate their code, their skills and their knowledge to .NET in a gradual manner at their own pace, which only a seamless hybrid VBA/VB.NET environment would allow.


/ 225