Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Beginner Questions About Terms

  Asked By: Koila    Date: Jan 01    Category: MS Office    Views: 818
  

I'm gradually getting the hang of things. I have a few ignorant
questions about terminology:

1. What are the other items in the Excel Collection(s)? Where can I
find a list of such things, so I know what I can refer to and what its
proper name is? How am I to know that worksheet objects are called
"Sheets" and not "Worksheets" or "Tabs"?

2. I notice that when I record a macro, the whole thing is called a
"sub". I imagine that's what makes it callable by name from other
macros. What's a "procedure" and how do procedures relate to macros
and subs?

3. How is "method" defined, and where can I find a list of the
methods available in Excel VBA? Is a method a kind of verb that acts
on an object, which is analogous to a noun? How can I find the
syntactical requirements for methods, and for that matter, what they do)?

Anybody?

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Alfonsine Miller     Answered On: Jan 01

> 1. What are the other items  in the Excel Collection(s)? Where can I
find  a list  of such things, so I know what I can refer  to and what its
> proper name is?

Excel has collections  for pretty much anything that can be collected. :-)
I don't know if there's anywhere they're all listed. Basically you can
assume that if you want a collection of something, then Excel already has
it. Ask specific questions  of Google and you'll probably find examples for
it.

> How am I to know that worksheet  objects are called
> "Sheets" and not "Worksheets" or "Tabs"?

Any introduction to Excel would probably have knocked "tabs" on the head.
Not so sure about "sheets" vs "worksheets". But again, a search for
examples will point you in the right direction.

> 2. I notice that when I record  a macro, the whole thing  is called  a
> "sub". I imagine that's what makes it callable by name from other
> macros. What's a "procedure" and how do procedures  relate to macros
> and subs?

A sub is a subroutine. The other similar type of construct is a function.
Functions return a single value as a "result"; subroutines do not. In
modern Excel, there is not actually such a thing as a "macro", although
there are still facilities to allow you to record them and otherwise control
them. But you are actually recording VBA subroutines in VBA modules.

And yes, they can be called by name from other code.

"Procedure" is a generic term that might refer to either a subroutine or a
function. It depends on the context. (Note that the Pascal language
actually calls subroutines "procedures" - so ex Pascal people, like me,
might use the term to mean subroutine. Also, C and similar languages call
both subroutines and functions "functions" - again leading to confusion on
occasions.)

> 3. How is "method" defined, and where can I find a list of the
methods  available in Excel VBA? Is a method  a kind  of verb that acts
> on an object, which is analogous to a noun? How can I find the
> syntactical requirements for methods, and for that matter, what they do)?

I don't think the term "method" is used around Visual Basic, although I
could well be wrong. Typically, though. "method" is a term used in
object-oriented programming. A "method" is a piece of code that is part of
an object  and is accessible to code outside the object (public methods).
The term "private method" is also used sometimes to refer to code in an
object that is not accessible from outside. A "method" can be either a
subroutine or a function. VBA allows you to create public and private
routines inside modules and class modules. These look pretty much like
methods in objects.

In structure and calling sequence they are simply subs and functions.
However, you will typically need to use "dot notation" to access them - i.e.
the object name, then a full-stop, then the method name.

Excel has internal objects, which have methods and attributes
(values/variables). An easy way to find which ones exist for a particular
object is to type the object's name and the full-stop, and wait for Excel
to give you a list. The help is pretty good too.

I suggest you don't set out to try to learn a wide slab of Excel -
instead choose something you want to program, and find out how to use the
facilities in that narrow slice of functionality. With Excel, if you need a
construct, you can be pretty sure that it'll be there - just chase down what
it's called using Google or help.

 
Answer #2    Answered By: Fedde Bakker     Answered On: Jan 01

I guess nobody's going to answer this plea. OK, please give me just
one lead as to where I can find  the answers?

 
Answer #3    Answered By: Taylor White     Answered On: Jan 01

A lot of material is available on the web and books to answer your
questions. Still, David has provided enough info to get you started.

I am listing below 2 well written books by John Walkenbach, the Excel guru:
Excel VBA Programming For Dummies
Excel 2003 Power Programming With VBA

You may also look up sites like MrExcel.com

And, writing small programs in VBA will help..

 
Didn't find what you were looking for? Find more on Beginner Questions About Terms Or get search suggestion and latest updates.




Tagged: