+ Reply to Thread
Results 1 to 2 of 2

Funtion Proper Grammar for Programming

  1. #1
    Registered User
    Join Date
    12-27-2012
    Location
    Panama
    MS-Off Ver
    Excel 2007
    Posts
    90

    Funtion Proper Grammar for Programming

    Good day,

    Still being exposed to new things in VBA, my code was getting a tad long and I wanted to divide into smaller versions of sub code.

    still experimenting with byval and byref, I understand the concept of it however i need practice,

    by val passes just the value, by ref changes the value in the function and when it returns to the main (I think that's right ...)

    However,

    I want to ask how the code should look? (Am I doing this right?)

    In my main I have to declare all general variables, and in the functions I can declare local variables if they only pertain to it and never have to use them again?




    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.






    what if I want to add coments like i did on my main for each variable? would the following be acceptable?


    Please Login or Register  to view this content.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Funtion Proper Grammar for Programming

    By Ref is the default - most of us don't bother to write it but the rest of the code is more critical!
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Disabling Grammar & Spelling check in MS Word thru Excel
    By jdlc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2012, 01:11 PM
  2. Grammar, and standard messages
    By Pete_UK in forum Suggestions for Improvement
    Replies: 2
    Last Post: 06-06-2012, 12:45 PM
  3. Grammar checking
    By spawforths in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-26-2011, 11:50 AM
  4. Good Links that Discuss Proper Programming Technique
    By jerseyguy1996 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-07-2009, 11:16 AM
  5. [SOLVED] Is there a grammar checker for Excel?
    By DDC in forum Excel General
    Replies: 1
    Last Post: 05-26-2005, 05:15 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1