Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Sheet selection

Hello,

Using VBA for Excel
How could I go about selecting all of the sheets in a
workbook except for 1 particular sheet. I would like to do
this without having to state the name of each individual
sheet, except for the 1 particular sheet.

Thank You,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Sheet selection

Sub Tester1()
Const shName As String = "Sheet1"
Dim sh As Worksheet, i As Long, j As Long
i = 1
j = 0
For Each sh In ThisWorkbook.Worksheets
j = j + 1
If LCase(sh.Name) < LCase(shName) Then
sh.Select sh.Name = Worksheets(i).Name
ElseIf j = 1 Then
i = j + 1
End If
Next


End Sub

--
Regards,
Tom Ogilvy


wrote in message
...
Hello,

Using VBA for Excel
How could I go about selecting all of the sheets in a
workbook except for 1 particular sheet. I would like to do
this without having to state the name of each individual
sheet, except for the 1 particular sheet.

Thank You,



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
automatic sheet selection swiftcode Excel Discussion (Misc queries) 2 June 4th 10 09:02 AM
Selection from list on main sheet from suplemental sheet in same w Kelly New Users to Excel 1 August 12th 05 04:37 PM
search in a sheet and selection? EM Excel Discussion (Misc queries) 0 February 2nd 05 02:43 PM
Excel VBA : Sheet selection vlbaranov Excel Programming 9 June 1st 04 01:17 PM
Copy Selection to new sheet James Excel Programming 3 April 22nd 04 03:48 AM


All times are GMT +1. The time now is 08:51 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"