View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
ALEX ALEX is offline
external usenet poster
 
Posts: 493
Default Selecting Last Worksheet

Hmmmm...nothing happened.



"Ron de Bruin" wrote:

Hi Alex

Try this

Sub test()
With ThisWorkbook
If .Sheets.Count 1 Then
Application.DisplayAlerts = False
.Sheets(.Sheets.Count).Delete
Application.DisplayAlerts = True
End If
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Alex" wrote in message ...


How would I select the last worksheet from a workbook?
I'm wanting to delete the last worksheet from a workbook.


--
Jack of all trades... master of none..