Automating Excel from VB 6.0

by Support 13. May 2009 11:59
Share on Facebook

This is a primer on using OLE Automation to create an Excel instance in Visual Basic 6.0 and control Excel from a VB6 Application. The following would also apply for Automating Excel from another Office Application such as Word, Access or Outlook.

The first step in Automating Excel is to add a Reference to the Microsoft Excel Object Library:

(1) Within VB 6.0, choose Alt|Project|References...

(2) Scroll down until you find "Microsoft Excel 10.0 Object Library", which could also be 8.0, 9.0, 11.0, or 12.0, depending on which version of Excel you are using. Click within the check box and then click <OK>. Now your Library reference is loaded.


Next you write your code! Bellow you will find a tested example...

Tags: ,

Programming

Comments


July 15. 2009 20:43
Registry Cleaner
I am doing something of the same interest and will be taking note on this .Thank

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Online Chat

About The Skills Way Center

 Welcome!   This is Skills Way Center, A computer training center located in Mina, Tripoli, Lebanon.
More...

   

 

free counters

Google Translator

Recent Comments

Comment RSS
Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 Skills Way Center Blog