View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
CmK CmK is offline
external usenet poster
 
Posts: 69
Default When Class object get created

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