Automation or Using other applications Libraries

Download vba eBook

Introduction

If you use the objects in other applications as part of your Visual Basic application, you may want to establish a reference to the object libraries of those applications. This Documentation provides a list, sources and examples of how to use libraries of different softwares, like Windows Shell, Internet Explorer, XML HttpRequest, and others.

Syntax

  • expression.CreateObject(ObjectName)
  • expression; Required. An expression that returns an Application object.
  • ObjectName; Required String. The class name of the object to create. For information about valid class names, see OLE Programmatic Identifiers.

Remarks

When an application supports Automation, the objects the application exposes can be accessed by Visual Basic. Use Visual Basic to manipulate these objects by invoking methods on the object or by getting and setting the object's properties.

If you use the objects in other applications as part of your Visual Basic application, you may want to establish a reference to the object libraries of those applications. Before you can do that, you must first be sure that the application provides an object library.

Allows you to select another application's objects that you want available in your code by setting a reference to that application's object library.

Creates an Automation object of the specified class. If the application is already running, CreateObject will create a new instance.

Related Examples

Stats

67 Contributors: 1
Friday, January 27, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook