Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Stop sheet showing when Using Datapig's Force Users to enable macr


Simply change this:
Code:
--------------------

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

--------------------
to this:
Code:
--------------------

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Warning").Visible = True
Sheets("Sheet1").Visible = xlVeryHidden
Application.ScreenUpdating = False
Msgbox "Please ignore warning sheet, this is for reset purposes!",vbokonly,"Close Notice"

--------------------


Trish Smith;587167 Wrote:
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



--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: 1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=162610

Microsoft Office Help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Stop sheet showing when Using Datapig's Force Users to enable

Hi Simon,
That does the job!
Thank you.

--
Trish


"Simon Lloyd" wrote:


Simply change this:
Code:
--------------------

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

--------------------
to this:
Code:
--------------------

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Warning").Visible = True
Sheets("Sheet1").Visible = xlVeryHidden
Application.ScreenUpdating = False
Msgbox "Please ignore warning sheet, this is for reset purposes!",vbokonly,"Close Notice"

--------------------


Trish Smith;587167 Wrote:
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



--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: 1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=162610

Microsoft Office Help

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
force users to enable macro so sheet cannot be printed Zambian Excel Discussion (Misc queries) 3 December 10th 08 07:36 PM
Programmatically opening workbooks in macros brings up Enable Macr Barb Reinhardt Excel Programming 14 July 15th 08 01:32 PM
Force users to enable macros when open a workbook Tan New Users to Excel 2 April 15th 07 05:09 PM
How to realize "enable macro" by VBA when opening a file with macr FrankJIN Excel Programming 1 August 16th 05 04:32 AM
Force Enable Macros Ed[_9_] Excel Programming 0 September 24th 03 07:59 PM


All times are GMT +1. The time now is 06:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"