Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Move through the sheets of a workbook

What is the code to move through the sheets of a workbook one by one and
after processing the last sheet, stop?

Thanks!

Steve


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Move through the sheets of a workbook

What is the code to move through the sheets of a workbook one
by one and after processing the last sheet, stop?


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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Move through the sheets of a workbook

Thanks, Rick!

Steve


"Rick Rothstein (MVP - VB)" wrote in
message ...
What is the code to move through the sheets of a workbook one
by one and after processing the last sheet, stop?


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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
move between sheets in workbook tiitsius Setting up and Configuration of Excel 1 April 28th 10 10:55 AM
how do I move between sheets in a workbook using the keyboard.... hamiltoncruiser Excel Discussion (Misc queries) 2 December 12th 07 03:46 AM
copy/move sheets within workbook Roger B. Excel Discussion (Misc queries) 1 May 5th 05 05:43 PM
Move sheets To New Wbk - recover workbook SIGE Excel Programming 2 April 15th 05 07:53 AM
How do I move between sheets in a workbook? nat Excel Programming 1 August 7th 04 04:31 PM


All times are GMT +1. The time now is 07:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"