Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to set up a work book so that when it opens the user can not go any
further with it until they tick a disclaimer.Once this disclaimer has been accepted thje work book opens up and the user can open all sheets |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about a simple Msgbox in Private Sub Workbook_Open() ?
This is in the ThisWorkbook module. RBS "group changes of spreadsheet" om wrote in message ... I want to set up a work book so that when it opens the user can not go any further with it until they tick a disclaimer.Once this disclaimer has been accepted thje work book opens up and the user can open all sheets |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
And a contingency plan if/when users disable macros on opening the workbook.
Insert a blank sheet named Dummy. Add a typed message in the center of the sheet like "You have disabled macros and made this workbook useless. Please close and re-open with macros enabled." Stick this code in Thisworkbook module. Save, close and re-open to see message box. Private Sub Workbook_Open() Dim sht As Worksheet Dim Msg, Style, Title, Response Msg = "Click Yes to Accept Disclaimer and Continue" & vbLf & _ "Or click No to Close workbook" Style = vbYesNo Title = "Disclaimer" Response = MsgBox(Msg, Style, Title) If Response = vbYes Then For Each sht In ActiveWorkbook.Sheets If sht.Name < "Dummy" Then sht.Visible = True End If Next sht Sheets("Dummy").Visible = False Else ThisWorkbook.Close savechange = False End If End Sub Private Sub Workbook_BeforeClose(Cancel As Boolean) Dim sht As Worksheet Application.ScreenUpdating = False Sheets("Dummy").Visible = xlSheetVisible For Each sht In ActiveWorkbook.Sheets If sht.Name < "Dummy" Then sht.Visible = xlSheetVeryHidden End If Next sht Application.ScreenUpdating = True End Sub Gord Dibben MS Excel MVP On Wed, 2 Dec 2009 22:08:39 -0000, "RB Smissaert" wrote: How about a simple Msgbox in Private Sub Workbook_Open() ? This is in the ThisWorkbook module. RBS "group changes of spreadsheet" . com wrote in message ... I want to set up a work book so that when it opens the user can not go any further with it until they tick a disclaimer.Once this disclaimer has been accepted thje work book opens up and the user can open all sheets |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Legal Disclaimer | Excel Discussion (Misc queries) | |||
MSN Quote Pop-UP Disclaimer | Excel Discussion (Misc queries) | |||
Using a disclaimer in excel | Excel Programming | |||
Using a disclaimer in excel | Excel Discussion (Misc queries) | |||
wish to add a disclaimer (like any software install) as per macro. | Excel Discussion (Misc queries) |