Thread: Add Sheets
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Add Sheets

Hi Bill,

Adressing the visible criterion, try:

'=============
Public Sub Tester2()
Dim i As Long

With ActiveWorkbook
For i = .Sheets.Count To 1 Step -1
If .Sheets(i).Visible Then
.Worksheets.Add after:=.Sheets(i)
Exit For
End If
Next i
End With
End Sub
'<<=============

---
Regards,
Norman