S Steve Sep 5, 2007 #1 What is the code to move through the sheets of a workbook one by one and after processing the last sheet, stop? Thanks! Steve
What is the code to move through the sheets of a workbook one by one and after processing the last sheet, stop? Thanks! Steve
R Rick Rothstein \(MVP - VB\) Sep 5, 2007 #2 What is the code to move through the sheets of a workbook one by one and after processing the last sheet, stop? Click to expand... Here is one way... Sub TestCode3() Dim WS As Worksheet For Each WS In Worksheets ' Your code goes here in ' place of the following WS.Range("A1") = WS.Name Next End Sub Rick
What is the code to move through the sheets of a workbook one by one and after processing the last sheet, stop? Click to expand... Here is one way... Sub TestCode3() Dim WS As Worksheet For Each WS In Worksheets ' Your code goes here in ' place of the following WS.Range("A1") = WS.Name Next End Sub Rick
S Steve Sep 5, 2007 #3 Thanks, Rick! Steve Rick Rothstein (MVP - VB) said: Here is one way... Sub TestCode3() Dim WS As Worksheet For Each WS In Worksheets ' Your code goes here in ' place of the following WS.Range("A1") = WS.Name Next End Sub Rick Click to expand...
Thanks, Rick! Steve Rick Rothstein (MVP - VB) said: Here is one way... Sub TestCode3() Dim WS As Worksheet For Each WS In Worksheets ' Your code goes here in ' place of the following WS.Range("A1") = WS.Name Next End Sub Rick Click to expand...