By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,475 Members | 2,060 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,475 IT Pros & Developers. It's quick & easy.

Intrinsic Constant Definitions

P: n/a
I have finally nagged more work out of the non-profit
organization that I'm trying to do volunteer work for.

The following code begins a tiny form that is part of the project that
I'll be working on.
It uses several VB intrinsic constants whose meaning and significance
I don't know. I couldn't find a list of these constants and their
definitions. Can anyone direct me to one?

If not, will someone please define the ones in this snippet for me?
thanks.

--thelma

Code Snippet:
-------------
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "Form_frmGenerateTables"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Compare Database
Jan 16 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Thelma Lubkin <th****@alpha2.csd.uwm.edu> wrote in
news:dq**********@uwm.edu:
The following code begins a tiny form that is part of the project
that I'll be working on.
It uses several VB intrinsic constants whose meaning and
significance I don't know. I couldn't find a list of these
constants and their definitions. Can anyone direct me to one?
I don't see any intrinsic constants being used. I see some custom
constants being *defined*, though. Well, not really constants, but
whatever VB means by "Attribute."

How are those used in the code? That would seem to me to illustrate
what they are for.
Code Snippet:
-------------
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "Form_frmGenerateTables"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Compare Database


I assume you recognize that this is VB code, and not VBA code?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jan 16 '06 #2

P: n/a
David W. Fenton <XX*******@dfenton.com.invalid> wrote:
: Thelma Lubkin <th****@alpha2.csd.uwm.edu> wrote in
: news:dq**********@uwm.edu:

:> The following code begins a tiny form that is part of the project
:> that I'll be working on.
:> It uses several VB intrinsic constants whose meaning and
:> significance I don't know. I couldn't find a list of these
:> constants and their definitions. Can anyone direct me to one?

: I don't see any intrinsic constants being used. I see some custom
: constants being *defined*, though. Well, not really constants, but
: whatever VB means by "Attribute."

Yes, I see that to call them 'intrinsic' to the language would
make no sense, since they're being set by the programmer. I do
assume--I haven't even been able to confirm this through any
documentation--that they are meant to remain constant for the class.
I found the phrase 'intrinsic constant' on the net, but not enough
explanation of its use, so I proceeded to misuse it...

I have been able to find numerous examples of these attributes
being used, but I've completely failed to find any explanations of
their meaning

: How are those used in the code? That would seem to me to illustrate
: what they are for.

They are never used in the code visible to me. I assume that they're
used at a level that is not shown to me, and this perhaps means that
they were created by someone writing code for a module and the system
filling in housekeeping. The snippet I show is the entire code
associated with frmGenerateTables that I've got.

:> Code Snippet:
:> -------------
:> VERSION 1.0 CLASS
:> BEGIN
:> MultiUse = -1 'True
:> END
:> Attribute VB_Name = "Form_frmGenerateTables"
:> Attribute VB_GlobalNameSpace = False
:> Attribute VB_Creatable = True
:> Attribute VB_PredeclaredId = True
:> Attribute VB_Exposed = False
:> Option Compare Database

: I assume you recognize that this is VB code, and not VBA code?

No, I didn't even know that.
--thelma

: --
: David W. Fenton http://www.dfenton.com/
: usenet at dfenton dot com http://www.dfenton.com/DFA/
Jan 17 '06 #3

P: n/a
These attributes are created by VB when the programmer sets various
properties of the form.

You only see these attributes if the (form, in this case) module has been
exported, in Access this happens when the module is saved to a text file
using the SaveAsText command.

If the file is loaded again using the LoadFromText command you will not see
them as they will be incorporated back into the module. If you are seeing
these in the module then I would guess that what has happened here is that
at some time the module has been saved using SaveAsText, the saved file has
been loaded into a text editor an then the whole of the text copied back
into a module in Access.

Of the attributes I recognise
MultiUse = -1 'True
==============
This means that more than one instance of the form can be created

Attribute VB_Name = "Form_frmGenerateTables"
===================================
This is the class name of the form module. The form name would be
frmGenerateTables.

Attribute VB_GlobalNameSpace = False
=============================
Don't know

Attribute VB_Creatable = True
======================
This indicates it is a COM creatable object

Attribute VB_PredeclaredId = True
=============================
Don't know

Attribute VB_Exposed = False
=============================
Indicates whether the COM object is externally creatable. IIRC this cannot
be true for a form (Lyle do you know otherwise ?)
--

Terry Kreft
"Thelma Lubkin" <th****@alpha2.csd.uwm.edu> wrote in message
news:dq**********@uwm.edu...
I have finally nagged more work out of the non-profit
organization that I'm trying to do volunteer work for.

The following code begins a tiny form that is part of the project that
I'll be working on.
It uses several VB intrinsic constants whose meaning and significance
I don't know. I couldn't find a list of these constants and their
definitions. Can anyone direct me to one?

If not, will someone please define the ones in this snippet for me?
thanks.

--thelma

Code Snippet:
-------------
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "Form_frmGenerateTables"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Compare Database

Jan 17 '06 #4

P: n/a
Terry Kreft wrote:
Attribute VB_Exposed = False
=============================
Indicates whether the COM object is externally creatable. IIRC this cannot
be true for a form (Lyle do you know otherwise ?)


My recollection is that it used to be true (in Access97) and I played
with the idea of having common forms (say a personal information form)
across multiple applications but I was unable to make this work
consistently with the coming of AC2K.
SO for AC2K I wrote some code to Save a Form as Text, and to process the
text to do all the combinations of the boolean attribute values possible
and then to save each result as a uniquely named form. One of these
(forget which one) was sometimes visible, create-able, usable; but I
could not find a rule which worked all the time.

BTW, VB 6.0 Programmer's Guide cautions against messing with
VB_PredeclaredID specifically and also says, "In general you should not
edit attributes manually ...."

While VB_Name may not be an internal constant, it is recognized as an
internal something. Try Debug.Print VB_Name. One is not permitted to try
to run this.

--
Lyle Fairfield
Jan 17 '06 #5

P: n/a
Terry Kreft <te*********@mps.co.uk> wrote:
: These attributes are created by VB when the programmer sets various
: properties of the form.

<snip clear, straightforward explanation>

Thank you.

This is !custom! documentation available only in
groups like this one to those of us who are not
active enough practitioners in the 'real world'
to have knowledgeable colleagues or teachers.

--thelma
: Terry Kreft
Jan 17 '06 #6

P: n/a
"Terry Kreft" <te*********@mps.co.uk> wrote in
news:fu********************@karoo.co.uk:
Attribute VB_Exposed = False
=============================
Indicates whether the COM object is externally creatable. IIRC
this cannot be true for a form (Lyle do you know otherwise ?)


I thought MichKa clued us in on the fact that with
SaveAsText/LoadFromText you could change this valuable to make, say,
class modules usable from external databases? Not sure about forms
-- I thought they were already externally available.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jan 17 '06 #7

P: n/a
You can definitely do it with class modules it was forms I was unsure about,
Lyle's replied elsewhere in this thread.

I believe that I was the first person to point this attribute out (but I may
well be wrong about that, other possibilities are Dev or indeed MichKa) but
AFAIK Lyle has done the most with changing these attributes which is why I
addressed my question to him.
--

Terry Kreft
"David W. Fenton" <XX*******@dfenton.com.invalid> wrote in message
news:Xn*********************************@127.0.0.1 ...
"Terry Kreft" <te*********@mps.co.uk> wrote in
news:fu********************@karoo.co.uk:
Attribute VB_Exposed = False
=============================
Indicates whether the COM object is externally creatable. IIRC
this cannot be true for a form (Lyle do you know otherwise ?)


I thought MichKa clued us in on the fact that with
SaveAsText/LoadFromText you could change this valuable to make, say,
class modules usable from external databases? Not sure about forms
-- I thought they were already externally available.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Jan 17 '06 #8

P: n/a
Terry Kreft wrote:
I believe that I was the first person to point this attribute out


I think so unless there is something hiding that is earlier than:
http://groups.google.ca/group/comp.d...83b8ae659b90f7

Jan 17 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.