Application.goto reference:="R13C1"
ActiveWorkbook.Names.Add Name:="Crib1Top", RefersToR1C1=ActiveCell
What do those lines of code do?
Thanks
jamie
Application.goto reference:="R13C1"
ActiveWorkbook.Names.Add Name:="Crib1Top", RefersToR1C1=ActiveCell
What do those lines of code do?
Thanks
jamie
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks