Difference between recorded macro and macros that are manually cod

D

Designingsally

I dont know if this question is dumb. But i m intrigued. Can someone tell me:
1. Difference between recorded macro and macros that are manually coded
2. Why is that macro code for word and macro code for excel different?
3. Is there some online tutorial as such where I m explained abt every
property, method, class available in the VBA Macro.
4. C++ comes under OOPS, under which catergory does VBA come under.
5. I know that VBA is subsidary of the VB. So, in that case can any visual
basic code be implemented using VBA?
6. Assume that I have a macro, can the macro be run for a particular portion
of the document? Is it possible if I highlight that portion using my cursor
and then run the macro. WIll the macro run for that portion of text?

thanks in advance
 
G

Graham Mayor

Designingsally said:
I don't know if this question is dumb. But I m intrigued. Can someone
tell me:
1. Difference between recorded macro and macros that are manually
coded

No essential difference, though not all procedures may be recorded and the
recorder does not always use the most efficient code.
2. Why is that macro code for word and macro code for excel different?

The file formats are entirely different. The vba takes account of that.
3. Is there some online tutorial as such where I m explained abt every
property, method, class available in the VBA Macro.

They are all explained in vba help in Word and all are more widely discussed
in a variety of web resources that you can find with your favourite search
engine.
4. C++ comes under OOPS, under which category does VBA come under.

No idea what you mean!
5. I know that VBA is subsidiary of the VB. So, in that case can any
visual basic code be implemented using VBA?

Not necessarily.
6. Assume that I have a macro, can the macro be run for a particular
portion of the document? Is it possible if I highlight that portion
using my cursor and then run the macro. Will the macro run for that
portion of text?

If you assign the selection to a range of tell the macro to use only the
selection then yes. The macro code samples that you have been shown all use
either selections or ranges.
thanks in advance

You are welcome

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

Pesach Shelnitz

Hi Sally,

I would like to add a few words to Graham's answers.

Question 1. There are many things that the recorder can't/won't do. For
example, the recorder does not create loops, which are essential elements in
the macros that you have been trying to develop.

Question 5. VBA supports most of the standard VB functions, but not all of
them. In particular, it supports the functions for manipulating and
processing strings. I have found that it is usually worthwhile trying a VB
function that I know, but be prepared for an occasional disappointment.
 

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

Top