cancel
Showing results for 
Search instead for 
Did you mean: 

Excel

ravitejat
Level 2
i am trying to make my own excel object for my requirements. I copied all the global code and imported all the references as the excel vbo. I am getting no error while compiling but when I run I get this error - " The given key was not present in the dictionary". What does it mean?
2 REPLIES 2

I think you are creating an instance with the common object and then trying to use that instance in a different coppied component. The objects are different and so are the instances when created if I am not mistaken.

MarkusKrahn
Level 3
What worked for me was using GetObject(,""Excel.Application"") in the code stages that i created in my more specific application to get the excel instance created by the MS Excel VBO. To add a key to the instance obtained, using the copied global code, the local code would look something like this (assuming you launched the application via MS Excel VBO already and only 1 instance is running): Dim app As Object app = GetObject(,""Excel.Application"") 'If you have a data item to store a handle in: 'Optional: handle = GetHandle(app) There are many other ways to achieve the above. That way you can also include other actions from the general VBO with a bit of diving into and understanding the code behind.