Hi,
We have to use API function when we handle multiple instance of excel application. If you don't have any idea about this I will post code.
musai.
Dear sir,
As long as i understood chandru's question, he should be using something like this to open an Excel's instance, and using its data:
- dim Obj1 as object
-
set obj1 = createobject("excel.application")
-
obj1.visible = true
-
obj1.workbooks.open ("c:\myBook.xls")
-
msgbox obj1.cells(1,1)
(that might have something to do with API's)
But chandru's problem (as i understood it) is that this new excel's instance (obj1) can be used during runtime by the user (since its visible). So if the user closes this Excel's Application instance. Any further code that references Obj1 will cause an error. The easier solution i can think of, is leaving this instance invisible for the user, so he'she cannot close it that easily.
But then again, sometimes i missunderstand the questions, and give solutions that have nothing to do with the subject.
Kad