Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CmK CmK is offline
external usenet poster
 
Posts: 69
Default When Class object get created

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default When Class object get created

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   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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Class modules: parametrize class object fields Jean-Pierre Bidon Excel Programming 11 August 31st 06 02:49 PM
Determine the class of an object Edward Ulle Excel Programming 6 July 22nd 04 08:34 AM
Class and object persistence James Neumann[_2_] Excel Programming 0 September 9th 03 03:48 PM


All times are GMT +1. The time now is 08:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"