Consulting

Results 1 to 3 of 3

Thread: Some Probably very basic VBA questions.

  1. #1

    Question Some Probably very basic VBA questions.

    Good Morning All and Seasons greetings if it?s not to early!

    If have been using VBA for a little while but have never been taught (cannot seem to learn from a book) apart from sites like these, with help from people like you, that said I have a few very probably basic questions.


    • What is the difference between putting a Macro I a sheet rather than a module?
    • Can a Macro be moved between Modules without any issues?
    • How many Macros can a Module/Sheet contain?
    • Does question 4 affect speed if there are lots?
    • Do comments/empty lines slow the operation of a Macro down?

    As always, you help is very much appreciated.

    Neil
    VBA is like French to my English , Enough to get a coffee but no idea how to ask for sugar and cream....

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by Endorphin
    <snip> ... that said I have a few very probably basic questions.

    What is the difference between putting a Macro I a sheet rather than a module?
    Code in a sheet module should only be code related to events on the worksheet, or worksheet evnts themselves.

    Quote Originally Posted by Endorphin
    Can a Macro be moved between Modules without any issues?
    Yes.

    Quote Originally Posted by Endorphin
    How many Macros can a Module/Sheet contain?
    As many as you like, but it can only be 64Kb ins size, and should be kept to a manageable number, preferably functionally grouped.

    Quote Originally Posted by Endorphin
    Does question 4 affect speed if there are lots?
    No, it is the code that affects speed.

    Quote Originally Posted by Endorphin
    Do comments/empty lines slow the operation of a Macro down?
    No.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Many Thanks XLD
    VBA is like French to my English , Enough to get a coffee but no idea how to ask for sugar and cream....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •