Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default vbe-disclaimer

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default vbe-disclaimer

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default vbe-disclaimer

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
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
Legal Disclaimer malbright Excel Discussion (Misc queries) 2 March 12th 10 03:11 PM
MSN Quote Pop-UP Disclaimer Wayne Wells Excel Discussion (Misc queries) 0 May 24th 07 10:29 AM
Using a disclaimer in excel Daniya Excel Programming 3 March 21st 06 03:01 PM
Using a disclaimer in excel Daniya Excel Discussion (Misc queries) 0 March 21st 06 01:47 PM
wish to add a disclaimer (like any software install) as per macro. kiwimark Excel Discussion (Misc queries) 2 December 2nd 04 02:41 AM


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

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

About Us

"It's about Microsoft Excel"