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: 5
Default Exclude Sheets from Macro

I want to exclude the last 3 worksheets from the following macro. Can you
please show how the code should be adjusted (and cleaned up). Many thanks.

Sub Sheetsless3()
Dim wSht As Worksheet
Dim myRng As Range
Dim allwShts As Sheets
Set allwShts = Worksheets
For Each wSht In allwShts
wSht.Columns(1).ColumnWidth = 51.57
wSht.Columns(2).ColumnWidth = 8
Set myRng = wSht.Range("C4:N4")
With myRng
.HorizontalAlignment = xlRight
.VerticalAlignment = xlTop
End With
Next wSht
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
Print macro to exclude a cell JaimeLex Excel Discussion (Misc queries) 5 April 18th 08 09:06 PM
Printing Selected worksheets but exclude the sheet "Sheets" Dolphinv4 Excel Discussion (Misc queries) 1 January 3rd 08 12:13 PM
Edit code - exclude sheets Steph[_6_] Excel Programming 7 March 15th 06 03:35 PM
Sort Macro to Exclude Blank Rows? ScottPcola Excel Worksheet Functions 1 January 5th 06 07:10 PM
Graphics Call With Macro - How to Exclude Some Pix? DocuMike Excel Programming 1 January 8th 05 11:21 PM


All times are GMT +1. The time now is 11:11 AM.

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"