LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 536
Default Loop to skip some sheets in workbook


What do I put where it says 'DO NOTHING so the loop will skip ws. X, Y & Z?

Thanks,
Howard

Option Explicit

Sub LoopThroughSheets()
Dim ws As Worksheet
If ws.Name = "X" Or ws.Name = "Y" Or ws.Name = "Z" Then
'DO NOTHING
Else
'Do some code stuff here like:
ws.Range("B1") = ws.Name
End If
End Sub
 
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
Loop several sheets - not all worksheets of workbook al Excel Programming 8 January 25th 09 11:25 PM
Master's please help me with my code; Doing a loop to copy valuesfrom a series Sheets of another workbook.. jhong Excel Programming 2 January 25th 08 10:30 AM
apply Macro to all sheets in workbook - loop [email protected] Excel Programming 3 July 19th 07 08:13 PM
Skip LOC in D While Loop Khurram Excel Programming 2 January 30th 07 05:15 PM
Loop through all sheets in workbook jennie Excel Programming 7 October 26th 05 11:54 AM


All times are GMT +1. The time now is 09:50 PM.

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

About Us

"It's about Microsoft Excel"