View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_4_] Jim Thomlinson[_4_] is offline
external usenet poster
 
Posts: 1,119
Default error in attempt to warn about macro security

In any workbook there must be at least 1 visible sheet. You are trying to
hide all of the sheets which will not work...
--
HTH...

Jim Thomlinson


"Pierre via OfficeKB.com" wrote:

Hi,

I have the followign code .....

Private Sub Workbook_Open()
Dim Sheet As Worksheet
For Each Sheet In Worksheets
If Sheet.Name < "waarschuwing" Then
Sheet.Visible = xlSheetHidden
End If
Next Sheet
Sheets("waarschuwing").Visible = xlSheetVeryHidden
Set Sheet = Nothing
end sub

When the code is run, i get an error message:

erro 1004
characteristic visible of class worksheet cannot be use

any ideas?
Pierre


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200511/1