--
Lyle
There are two ways around this.
One is to create a function in your Library database which returns an
instance of your class object, the other is to export the class module to a
file, edit the file and change the
Attribute VB_Exposed = False
line to
Attribute VB_Exposed = True
and then insert the file into a new class module.
Lyle Fairfield <lyle...@cgocable.net> wrote in message
news:74gi2a$ov$1...@usenet40.supernews.com...
--
Lyle
Terry Kreft <terry...@mps.co.uk> wrote in message
news:74gmu3$6jn$1...@gate.mps.co.uk...
Michael
Lyle Fairfield <lyle...@cgocable.net> wrote in message
news:74gqlf$n8n$1...@usenet43.supernews.com...
Michael S. Kaplan <mic...@nospam.trigeminal.com> wrote in message
news:eYE4UTfI#GA.320@upnetnews03...
Michael
Lyle Fairfield <lyle...@cgocable.net> wrote in message
news:74gvfl$e0r$1...@usenet42.supernews.com...
Lyle
--
Lyle
Michael S. Kaplan <mic...@nospam.trigeminal.com> wrote in message
news:uCdSiPgI#GA.79@upnetnews03...
Public Function QIClass1() As Class1
Set QIClass1 = New QIClass1
End Function
in a standard module.
Michael
Lyle Fairfield <lyle...@cgocable.net> wrote in message
news:74h3l3$s18$1...@usenet43.supernews.com...
Hi Lyle,
You seem to have misread my post, you need to change
Attribute VB_Exposed = False
to
Attribute VB_Exposed = True
not the VB_Creatable attribute.
Michael S. Kaplan <mic...@nospam.trigeminal.com> wrote in message
news:#SuOl1kI#GA.190@upnetnews03...
I tried "ATTRIBUTE VB_Exposed = True", although I had to enter the line
(there was no exisitng "ATTRIBUTE VB_Exposed = False" line), but I did not
find that it made the class visible in the "referencer" database. I did find
a line "ATTRIBUTE VB_Creatable = True" and when I changed it to "ATTRIBUTE
VB_Creatable = False" the class did become visible but I was still not
allowed to create multiple copies of the class. I also found that the
visibility of the Class seemed erratic; Now you see me; Now you don't!
I also tried using a function in the code DB to return an reference to the
Class. I found that if the Class was invisible then the function was
invisible.
I think I am not going to use Classes in Code DBs.
I am now deciding among:
1. rewriting the classes as ordinary modules;
2. leaving them in the referencer MDB;
3. returning to the DLL idea.
Thanks for your help.
Lyle
--
Lyle
Terry Kreft <terry...@mps.co.uk> wrote in message
news:74jeqb$86f$1...@gate.mps.co.uk...
FWIW, SaveAsText or File/Save As Text do not put that line in the exported
file. Try closing the module and doing a File/SaveAs/Export to a text file.
This created the following header for me.
Attribute VB_Name = "cDirty"
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Similarly, you have to import the file I believe for things to work
properly.
-- Dev
Lyle Fairfield wrote in message <74jsku$dt2$1...@usenet41.supernews.com>...
:Terry
:
:I tried "ATTRIBUTE VB_Exposed = True", although I had to enter the line
:(there was no exisitng "ATTRIBUTE VB_Exposed = False" line), but I did not
:find that it made the class visible in the "referencer" database.
<<snip>>
Change this to
Attribute VB_Exposed = True
and save the file
6) Rename your Class module
7) Create a new empty class module with the old name
8) In design view for the new Class module -
Go to the "Insert, File..." menu item and select the amended text
file
That is it, you now have an externally creatable class.
Lyle Fairfield <lyle...@cgocable.net> wrote in message
news:74jsku$dt2$1...@usenet41.supernews.com...
Michael
Terry Kreft <terry...@mps.co.uk> wrote in message
news:74o59q$e9h$1...@gate.mps.co.uk...
and
"In the fastest form of early binding, vtable binding, Visual Basic uses an
offset into a virtual function table, or vtable. Visual Basic use vtable
binding whenever possible."
So, I'm wondering and can't find:
What kind of binding do I get for Classes in Code dbs? ... the same, faster,
slower?
Do DLL's have any natural advantage over Code dbs other than having the
richer function set of VB available to them?
Lyle
--
Lyle
Michael S. Kaplan <mic...@nospam.trigeminal.com> wrote in message
news:ekXaIRFJ#GA.220@upnetnews03...
Not sure I understand the question... VB does not have a richer function set
than any Office app, its all a matter of what you reference.... and VBA
supports early binding just as VB does.
Michael
Lyle Fairfield <lyle...@cgocable.net> wrote in message
news:74ouhe$q36$1...@usenet41.supernews.com...