Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900