Results 1 to 5 of 5

replacing sheet("XX").Select with for Loop Worksheet Name

Threaded View

  1. #1
    Forum Contributor
    Join Date
    10-16-2011
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    112

    replacing sheet("XX").Select with for Loop Worksheet Name

    Here is the For Loop I used to to find the name and range for a Workbook

    For Each wsh In ThisWorkbook.Worksheets
        If (Left(wsh.Name, 3) = "001") Then
            Set Rng = wsh.Range("A1").CurrentRegion
            Exit For
        End If
    Next
    But now how do I just replace the Workbook with the following code above with the one below with If (Left(wsh.Name, 3) = "001")

        Sheets("001_Table").Select
    Last edited by Jerseynjphillypa; 08-03-2012 at 10:01 AM.

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