![]() |
GetObject function
The last line in the help file for the GetObject function is:
You can't use GetObject to obtain a reference to a class created with Visual Basic. Why not? I was hoping to have some COM object (created with VB6, or maybe VB.NET) that I load into Excel that keeps track of certain application level events, which I can then call the class of from any VBA-enabled app using the GetObject function, and get data from it. Is this not possible? |
GetObject function
It is not possible using GetObject on a VB class. Use C++ to create your
object (I don't know the details, but I am sure they can be looked up.), or figure out how to use CreateObject to do what you want. "R Avery" wrote in message ... The last line in the help file for the GetObject function is: You can't use GetObject to obtain a reference to a class created with Visual Basic. Why not? I was hoping to have some COM object (created with VB6, or maybe VB.NET) that I load into Excel that keeps track of certain application level events, which I can then call the class of from any VBA-enabled app using the GetObject function, and get data from it. Is this not possible? |
GetObject function
So, suppose I create a VB6 single-instance COM object that runs as an
addin to Excel. Then how would I get a reference to the object from Outlook so that I can check its properties? Bob Kilmer wrote: It is not possible using GetObject on a VB class. Use C++ to create your object (I don't know the details, but I am sure they can be looked up.), or figure out how to use CreateObject to do what you want. "R Avery" wrote in message ... The last line in the help file for the GetObject function is: You can't use GetObject to obtain a reference to a class created with Visual Basic. Why not? I was hoping to have some COM object (created with VB6, or maybe VB.NET) that I load into Excel that keeps track of certain application level events, which I can then call the class of from any VBA-enabled app using the GetObject function, and get data from it. Is this not possible? |
GetObject function
My reply to Henning Eiben, titled 'Excel Library', might help.
-- HTH RP "R Avery" wrote in message ... So, suppose I create a VB6 single-instance COM object that runs as an addin to Excel. Then how would I get a reference to the object from Outlook so that I can check its properties? Bob Kilmer wrote: It is not possible using GetObject on a VB class. Use C++ to create your object (I don't know the details, but I am sure they can be looked up.), or figure out how to use CreateObject to do what you want. "R Avery" wrote in message ... The last line in the help file for the GetObject function is: You can't use GetObject to obtain a reference to a class created with Visual Basic. Why not? I was hoping to have some COM object (created with VB6, or maybe VB.NET) that I load into Excel that keeps track of certain application level events, which I can then call the class of from any VBA-enabled app using the GetObject function, and get data from it. Is this not possible? |
All times are GMT +1. The time now is 05:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com