Questions on VB and VBA

  • Thread starter Thread starter Gromit
  • Start date Start date
G

Gromit

Stuff this into the category o
stupid-questions-we've-answered-time-and-again, but a quick review o
Google groups revealed no-one has yet been stupid enough to ask thes
specific questions to quite the degree of stupidity to which I am abou
to embark:

1) When I hit the Help tab in the VBE from Excel, is this a VB hel
file or a VBA help file? It calls itself "Visual Basic Help" but
suspect there's more to VB than this. There's clearly nothing to d
with Excel directly here. Is this some kind of subset of VB, or is thi
the 'core' of VBA that the other applications (e.g. Excel, Word etc ar
built around? Also, is this what I have seen referred to as the "VB
Object model"?

2) After days of frustrated head banging, I found the actual Excel VB
help file (VBAXL9), which is obviously located in the C:/Progra
Files/Microsoft Office/Office/1033 directory (what was I thinking?).
take it that this file contains only those objects, methods propertie
etc that are unique to Excel? Would I be correct in referring to thi
as the Excel VBA Object Model?

3) By the way, is there a direct way of accessing this from the VBE?
realize that the object browser spits me out here, but the the fil
contains lots of excellent information on all kinds of excel issue
(e.g. the "Getting Started with Excel VBA" section) that you wouldn'
get to via the Object Browser, so there must be a front doo
somewhere?

Thanks for any insights into this,

Graha
 
1) When I hit the Help tab in the VBE from Excel, is this a VB help
file or a VBA help file?

VBA, VB is "Visual Basic" and VBA is "Visual Basic for Applications", Excel
is an application...
It calls itself "Visual Basic Help" but I
suspect there's more to VB than this.

Correct, VB is a RAD tool (Rapid Application Development), and as such
contains tools to create an application from the ground up. One of the
objects in VB is VBA.
There's clearly nothing to do
with Excel directly here. Is this some kind of subset of VB, or is this
the 'core' of VBA that the other applications (e.g. Excel, Word etc are
built around?

I'm not exactly sure what you mean with this question. VBA is a language
that Excel, Access, Word etc. have built into them. It is also a sub-set of
VB.
Also, is this what I have seen referred to as the "VBA
Object model"?

The "VBA Object Model" is the model of the objects (and the relationships
between these objects) contained within VBA.

The "Excel Object Model" contains objects specific to Excel.
2) After days of frustrated head banging, I found the actual Excel VBA
help file (VBAXL9), which is obviously located in the C:/Program
Files/Microsoft Office/Office/1033 directory (what was I thinking?). I
take it that this file contains only those objects, methods properties
etc that are unique to Excel? Would I be correct in referring to this
as the Excel VBA Object Model?

You would be correct in referring to it as the "Excel Object Model", VBA is
simply a language (one of many) that may be used to access the objects in
the Excel Object Model.
3) By the way, is there a direct way of accessing this from the VBE? I
realize that the object browser spits me out here, but the the file
contains lots of excellent information on all kinds of excel issues
(e.g. the "Getting Started with Excel VBA" section) that you wouldn't
get to via the Object Browser, so there must be a front door
somewhere?

Try the HELP menu!
Thanks for any insights into this,

You're welcome, I just hope you are not more confused now than before? <g>
 
Thanks Michael,

I guess the main source of my confusion is the fact that when you hi
the help file from VBE from Excel, you do not see (or at least I do no
see) a list of topics that pertain to Excel. Rather there are topic
that seem to pertain to all (office?) applications, but that are no
listed in the application-specific help files. I cannot seem to fin
the Excel-specific help file contents directly from the VBE withou
first typing in an Excel-specific question in this help file.

For example, in Excel, I click Alt 11 to get to the VBE, then clic
help and hit the contents tab. There I see six major topics, none o
which refer to Excel by name. When I hit 'Visual Basic Basic Languag
Reference' and 'objects', I see just a puny subset of 14 objects tha
relate mostly just to file issues.

There must, therefore, be a distinction between this 'Visual Basi
Basic Language Reference' and the help file that I find in folder 1033
which is specifically aimed at Excel. So what I want to know is, if th
file in 1033 (VBAXL9) is the Excel VBA object model, what the dicken
is the thing I'm looking at when I first hit help from the VBE?

Thanks!

Graha
 
I guess the main source of my confusion is the fact that when you hit
the help file from VBE from Excel, you do not see (or at least I do not
see) a list of topics that pertain to Excel.

Yes, well it makes sense if you consider that while in the programming
environment you would want help on programming topics rather than an Excel
user-manual.
Rather there are topics
that seem to pertain to all (office?) applications, but that are not
listed in the application-specific help files. I cannot seem to find
the Excel-specific help file contents directly from the VBE without
first typing in an Excel-specific question in this help file.

That's correct, the VBE is the same for all office apps and you can program
Access from Excel, Excel from Access etc.
For example, in Excel, I click Alt 11 to get to the VBE, then click
help and hit the contents tab. There I see six major topics, none of
which refer to Excel by name. When I hit 'Visual Basic Basic Language
Reference' and 'objects', I see just a puny subset of 14 objects that
relate mostly just to file issues.

Now you've got to read 'em! said:
There must, therefore, be a distinction between this 'Visual Basic
Basic Language Reference' and the help file that I find in folder 1033,
which is specifically aimed at Excel. So what I want to know is, if the
file in 1033 (VBAXL9) is the Excel VBA object model, what the dickens
is the thing I'm looking at when I first hit help from the VBE?

It's just a help file for general programming stuff, the best thing you can
do at this point is to work your way through the topic named "Visual Basic
Conceptual Topics" and see how you go from there.

You're welcome.
 
1) VBA is a subset of VB. I have always assumed that Help files that say
"VB" within Office really translate to "the only VB you have access to from
here: VBA"

2) Yes that's the Excel VBA Object Model (in the Excel section of that Help
file).

3) Direct? Sort of. Here's what I do: while in the VBE, highlight an
obviously Excel-specific object within a piece of code (Worksheet, Range,
etc.) and press F1. This should force the Contents pane of the Help system
to include the Excel Visual Basic Reference (along with several other
additional References like Office VB, DAO, ADO and Jet SQL). You can also
get to these references if you press F1 while in the Excel (not VBE)
interface and then select "Programming Information" in the Contents pane.

I use the Contents pane a lot to navigate Help. I also use it to determine
what kind of Help I am currently being graced with.

That said, note that opening "Visual Basic only" Help from the VBE Menu
gives you 6 or so Contents topics, one of which is the Language Reference.
However, if you open "VB only Help" by pressing F1 (with either a VB object
in code or no code selected) you only get the Language reference in Contents
(I find this quite annoying myself).

If you open "Excel VB Help" as described earlier, you get 3 of the VB topics
that you would have gotten if you used the menu to access "VB only help",
but not the other 3. However, you also get the Excel, Office, ADO, DAO
references.

None of this is necessarily a problem, once you are aware that what Help
files you are being shown is controlled by the context of how it was first
opened and how you have "refreshed" it by hitting F1.

I'm using Office XP. Your mileage may vary.

Hope this helps,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top