O'Reilly logo

Programming Excel with VBA and .NET by Steve Saunders, Jeff Webb

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Link and Embed Objects

You can include objects created by other applications in an Excel worksheet by linking or embedding the object:

Linked objects

Display a bitmap image of the object that opens the object’s file in its source application when the user edits the object.

Embedded objects

Also display a bitmap image, but the data for the object is stored within the workbook. Editing the object opens the object in place so Excel still appears to have focus and changes don’t affect the original source file, only the embedded copy.

This feature was originally called OLE, for Object Linking and Embedding, but Microsoft later renamed it ActiveX and now sometimes calls it COM, for Component Object Model. All those names basically refer to the same thing when dealing with Excel.

Any Windows application can provide these objects, but it is up to the developers of that source application to do it correctly—sometimes that is a tall order. Crashes, printing problems, and quirky displays are hallmarks of many linked or embedded objects . However, Microsoft has invested a great deal of effort to make OLE work within the Microsoft Office product suite, and linked and embedded objects usually work correctly within that family of products.

Warning

In general, it is a good idea to use linking and embedding only among Office or other well-tested applications and to be very careful when using it with workbooks you plan on distributing to others. That is because all users must have the source ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required