Click here to Skip to main content
13,596,176 members
Rate this:
Please Sign up or sign in to vote.
See more:
In my Visual Basic Project(VB6), I have used several OLE Controls, inserting Excel objects(Excel-macro enabled). These objects(Excel) are created as new(not linked). For these OLEs, I have given separate names.

When these OLEs are opened, the Excel objects are opened as Book1, Book2, Book3 etc. The data from Book1 is taken to Book2 or to other books, also through formulae in cells.

The problem is:- If I open any other Excel during my VB6 project, the book numbers get disturbed and it affects the data transfer from one book to another.

Is there any way to open/reference these OLE objects(Excel) with physical address(like sample_project > custom_book.xls) instead of Book1, Book2 etc. ?

What I have tried:

I have tried using Excel objects with link to an existing Excel file but I do not want to create links to outside files. Without link, the opened objects are named as Book1, Book2 etc. only.
Posted 17-Jul-17 9:48am
Updated 17-Jul-17 9:54am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web01-2016 | 2.8.180621.3 | Last Updated 17 Jul 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100