Results 1 to 9 of 9

Change Sheet Name

Threaded View

  1. #1
    Registered User
    Join Date
    09-15-2009
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Smile Change Sheet Name

    I am trying to update my sheet name based on a reference to cell a27 in the worksheet. Only thing is I don't want it to affect all tabs, just those in between my bookends aptly named first and last. I have tried working this on my own, stringing bits of already existing macros in my book, but as I am a novice (that's being generous) it is clearly not working. Can someone take a look below and advise where I am going wrong? I know I really suck at this so don't laugh too hard.


    ' Keyboard Shortcut: Ctrl+n
    Dim lngI As Long
    For lngI = Sheets("First").Index + 1 To Sheets("Last").Index - 1 Step 1
        With Sheets(lngI)
          For i = 1 To Sheets.Count
        If Worksheets(i).Range("A27").Value <> "Current Invoice" Then
            Sheets(i).Name = Worksheets(i).Range("A27").Value
        End If
        
      Next lngI
        
    End Sub
    Also if anyone can offer any recommended reading on programming that would be most kind. Thanks a bunch.

    Warmest Regards-
    Kiki
    Last edited by mrsogmax76; 10-04-2009 at 12:55 AM. Reason: Solved

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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