Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have an addin and i need to use some of the objects in the funciton from the addin in my open workbook event but it is telling me object required . My code works when the workbook has fully loaded I am thinking the addin class doesnt get created until later when the workbook is fully loaded Can someone tell me when does the Addin object get created and why cant i use it in the open event plus can i create the class objects faster or force vba code to load these objects first in my addin when my workbook open Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try Declaring your class in your 'ThisWorkbook' module BEFORE your first
procedure. Something like.. Option Explicit 'set up MyClass Dim clsMyClass As New Class_MyClass Sub My1stProcedure Msgbox "Hello" End Sub -- Hope this helps. If it does, please click the Yes button. Thanks in advance for your feedback. Gary Brown "CmK" wrote: Hi I have an addin and i need to use some of the objects in the funciton from the addin in my open workbook event but it is telling me object required . My code works when the workbook has fully loaded I am thinking the addin class doesnt get created until later when the workbook is fully loaded Can someone tell me when does the Addin object get created and why cant i use it in the open event plus can i create the class objects faster or force vba code to load these objects first in my addin when my workbook open Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nah that wasnt it
It is something to do with when the addin creates the class I think its a com addin I guess i have to read up on it Thanks anyways "Gary Brown" wrote: Try Declaring your class in your 'ThisWorkbook' module BEFORE your first procedure. Something like.. Option Explicit 'set up MyClass Dim clsMyClass As New Class_MyClass Sub My1stProcedure Msgbox "Hello" End Sub -- Hope this helps. If it does, please click the Yes button. Thanks in advance for your feedback. Gary Brown "CmK" wrote: Hi I have an addin and i need to use some of the objects in the funciton from the addin in my open workbook event but it is telling me object required . My code works when the workbook has fully loaded I am thinking the addin class doesnt get created until later when the workbook is fully loaded Can someone tell me when does the Addin object get created and why cant i use it in the open event plus can i create the class objects faster or force vba code to load these objects first in my addin when my workbook open Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Class modules: parametrize class object fields | Excel Programming | |||
Determine the class of an object | Excel Programming | |||
Class and object persistence | Excel Programming |