View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Workbook close error

It didn't for me Harald, I tested with Welcome as the last sheet.

--

HTH

RP

"Harald Staff" wrote in message
...
This will err if Welcome is the last sheet. (But it probably isn't :-)

Best wishes Harald

"Bob Phillips" skrev i melding
...

Sub workbook_before_close()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Visible = (ws.Name < "Welcome") * -1 - 1
Next ws
Application.SaveWorkspace
End Sub