+ Reply to Thread
Results 1 to 6 of 6

Cannot understand the meaning of a couple of variables

  1. #1
    Registered User
    Join Date
    11-04-2011
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    15

    Cannot understand the meaning of a couple of variables

    Can anyone please please explain to me what 'rOld', and 'Dim i' means???


    Please Login or Register  to view this content.
    Thank you so much!!

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Cannot understand the meaning of a couple of variables

    rOld is a variable representing a range of cells. It is set if you change a cell which isn't on row 1 and will represent a range of columns 1-256 on the row on which the change is made.

    It's declared as a static variable, so its value won't be reset each time the sub-routine is called.

    "Dim i As Long" just declares a numeric variable. Programming tradition uses "i" as the variable to control looping through a series of numbers, which is exactly what i is being used for in the line "For i = 1 To cnNUMCOLS", where it will loop from 1 through to 256.

  3. #3
    Registered User
    Join Date
    11-04-2011
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Cannot understand the meaning of a couple of variables

    Think I got it :P

    Thanks Andrew!!

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Cannot understand the meaning of a couple of variables

    You can colour a row in 1 go:
    Please Login or Register  to view this content.



  5. #5
    Registered User
    Join Date
    11-04-2011
    Location
    Rotterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Cannot understand the meaning of a couple of variables

    Could you maybe tell me how/where you learnt this??

  6. #6
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Cannot understand the meaning of a couple of variables

    In/from VBEditor's (Alt-F11) helpfiles (F1).

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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