+ Reply to Thread
Results 1 to 2 of 2

what does this do!??!

Hybrid View

  1. #1
    Registered User
    Join Date
    05-11-2005
    Posts
    12

    what does this do!??!

    Application.goto reference:="R13C1"
    ActiveWorkbook.Names.Add Name:="Crib1Top", RefersToR1C1=ActiveCell

    What do those lines of code do?
    Thanks
    jamie

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Jamie,

    What Do these Lines of Code Do?
    Application.goto reference:="R13C1"

    Application.Goto selects any range or Visual Basic procedure in any workbook, and activates that workbook if it's not already active.
    In this case, the cell being jump to is 13 Rows to the right and 1 Column down from the Active Cell.

    ActiveWorkbook.Names.Add Name:="Crib1Top", RefersToR1C1=ActiveCell

    Names property sets or returns a defined name for a range of cells.
    This Names the Active Cell Crib1Top and stores it's address in Excel's Name references list.

    About R1C1 references
    
    In R1C1 style, Microsoft Excel indicates the location of a cell with an "R" followed by a row number and a "C" followed by a column number. For example, the absolute cell reference R1C1 is equivalent to the absolute reference $A$1 in A1 reference style. If the active cell is A1, the relative cell reference R[1]C[1] refers to the cell one row down and one column to the right, or B2.
    The following are examples of references in R1C1 style.
    
    Reference	Meaning
    R[-2]C		A relative reference to the cell two rows up and in the same column
    R[2]C[2]	A relative reference to the cell two rows down and two columns to the right
    R2C2		An absolute reference to the cell in the second row and in the second column
    R[-1]		A relative reference to the entire row above the active cell
    R		An absolute reference to the current row


    Sincerely,
    Leith Ross

+ 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