Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Instancing on Classmodule on Excel 2002

Hi all,

I am using Excel 2002 SP2 on Windows XP

I found Instancing on ClassModule that you can set it either "Private" (I
think this is default and used it as you have been using) or
"PublicNotCreatable". Can anyone tell me how to use each case? I cannot see
any documentation on this on MSDN. Also, I have this sneaky suspicion that I
have seen this somewhere else, not on VB6 but somewhere...

Cheers,
---
Tetsuya Oguma, Sydney, Australia
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Instancing on Classmodule on Excel 2002

"Tetsuya Oguma" <Tetsuya wrote in message
...
I found Instancing on ClassModule that you can set it either "Private" (I
think this is default and used it as you have been using) or
"PublicNotCreatable". Can anyone tell me how to use each case? I cannot

see
any documentation on this on MSDN. Also, I have this sneaky suspicion that

I
have seen this somewhere else, not on VB6 but somewhere...


Hi Tetsuya,

Private and PublicNotCreatable are the only two instancing types
supported in Excel VBA. VB6 has these instancing types as well as four
others (depending on what type of project you are creating). In Excel VBA
the meaning of these instancing types is the following:

Private - Classes of this type are not visible outside the project where
they are located. This is the only instancing type available to classes such
as UserForms. This means there is no way to reference this type of class
from another workbook.

PublicNotCreatable - Classes of this type can be "seen" by other projects if
you set a reference to the project containing the class using the VBE
Tools/References dialog. This means you can declare a variable of this class
type in another project but you cannot create an instance of the class in an
outside project. The project containing the class must provide a function or
subroutine located in a standard module that creates an instance of the
class and passes that instance to other projects via a function return value
or ByRef subroutine argument.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


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
Excel 2002 : Unable to open files in MS Outlook 2002 Mr. Low Excel Discussion (Misc queries) 1 June 29th 07 02:12 PM
Outlook 2002 calendar dates exported to Excel 2002 sort incorrectl scampbell Excel Worksheet Functions 0 February 22nd 06 06:31 PM
Can you print labels using Excel 2002 in a Word 2002 mail merge? Individual_ Excel Discussion (Misc queries) 3 December 17th 04 08:39 PM
Can I create in VBA a class with instancing type different from 1 and 2? Dmitry V. Petkun Excel Programming 2 November 4th 03 05:31 PM
Excel 2002 files attached to Outlook 2002 EMails change size AJStadlin Excel Programming 1 October 15th 03 12:12 AM


All times are GMT +1. The time now is 03:51 AM.

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

About Us

"It's about Microsoft Excel"