View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jgmiddel jgmiddel is offline
external usenet poster
 
Posts: 1
Default Error sheet when macro's are not activated


Hi,

Im working on a file, the macro's must be actived. If not, the use
should see the "errorsheet". I guess this should be the "openingspage
of the file. If the macro's are activated, the sheet Welcome i
selected. So far so good.

But, the screen blinks and that is not what I want. Is there
solution?

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
Sheets("Error").Visible = True
Sheets("Error").Select
Sheets("Welkom").Visible = xlSheetVeryHidden
ActiveWorkbook.Save
Application.ScreenUpdating = True
End Sub
Private Sub Workbook_Open()
Application.ScreenUpdating = False
Sheets("Welkom").Visible = True
Sheets("Welkom").Select
Sheets("Error").Visible = xlSheetVeryHidden
Application.ScreenUpdating = True
End Su

--
jgmidde
-----------------------------------------------------------------------
jgmiddel's Profile: http://www.excelforum.com/member.php...fo&userid=3271
View this thread: http://www.excelforum.com/showthread.php?threadid=52546