Results 1 to 2 of 2

Help with renaming a sheet and referencing that sheet in a macro

Threaded View

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    New Lowell, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    6

    Help with renaming a sheet and referencing that sheet in a macro

    Hi,

    I am new to programming in Excel.

    #1 I have created a macro that copies a sheet, and then takes information off of the sheet, and puts it on a summary sheet.
    My sheets arealphabetically named... A, B, C, D, etc. and I want to be able to create new sheets, with the next letter in the alphabet. Can I make VBA reference a cell on a sheet to give the new sheet its name?

    #2 Additionally, I run into a problem with referencing the new sheet to my summary sheet. Below is my current code. The problem is that the new sheet name "M" is hardcoded in there. I am not sure how to make this reference a new sheet with a new name.
    Ex:
        Range("A30").Select
        ActiveCell.FormulaR1C1 = "=M!R[-24]C[2]"
    Any help is apreciated. Thanks
    Last edited by Cutter; 10-29-2012 at 09:12 PM. Reason: Added code tags

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