View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Trish Smith Trish Smith is offline
external usenet poster
 
Posts: 49
Default Stop sheet showing when Using Datapig's Force Users to enable macr

Hi,

I think this is probably not do-able

I'm using Datapig Technologies example to force users to enable macros

When the workbook is closed all sheets other than a warning sheet are very
hidden so that if the workbook is opened with macros disabled then the user
can only see a warning sheet saying to close and open with macros enabled.

Then on opening with macros enabled the waring sheet is very hidden and the
other sheets can be seen.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
Sheets("Warning").Visible = True
Sheets("Sheet1").Visible = xlVeryHidden

Private Sub Workbook_Open()
Application.ScreenUpdating = False
Sheets("Sheet1").Visible = True
Sheets("Warning").Visible = xlVeryHidden

This works beautifully but when the workbook is closed the user sees the
warning sheet (and panics!) also confusing for the user is the fact that if
they save then close they are asked if they want to save their changes but
they are not aware that they have made any changes.

Does anyone have any suggestions?

I've put a sentence on the warning sheet saying if closing then save
normally but if opening scroll down to a warning about enabling macros.
Clunky.

Cheers
--
Trish