Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 989
Default how do i set up a user prompt at the start of an excel workbook ?

I need to create a security feature which requests the users agreement prior
to entering into a worksheet. How do I do that?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default how do i set up a user prompt at the start of an excel workbook ?

Mark,

Right click the sheet tab of the sheet you want to protect, View code and
paste the code below in. Change the ProtectedSheet to the correct sheet name
and the outsheet variable to where you want to go if the user doesn't agree.

A couple of points. If macros aren't enabled it won't work and it provides
very little security because Excel security is weak.

Private Sub Worksheet_Activate()
msg = "Do you agree to the terms and conditions. Y/N?"
ttl = "User Agreement"
Set ProtectedSheet = Sheets("Sheet1") 'Change to suit
Set OutSheet = Sheets("Sheet2") 'Change to suit
ProtectedSheet.Visible = False
response = MsgBox(msg, vbYesNo, ttl)
Application.EnableEvents = False
If response = vbYes Then
ProtectedSheet.Visible = True
ProtectedSheet.Activate
Else
OutSheet.Activate
ProtectedSheet.Visible = True
End If
Application.EnableEvents = True
End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Mark" wrote:

I need to create a security feature which requests the users agreement prior
to entering into a worksheet. How do I do that?

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
Prompt user on automatic updates for Workbook Links Rob Moore Excel Discussion (Misc queries) 0 February 10th 09 02:43 PM
start up prompt for updating links egarcia Excel Discussion (Misc queries) 2 February 26th 07 05:36 PM
How prompt Excel user to fill cell with text, i.e., proposal name Deb Excel Discussion (Misc queries) 5 June 5th 06 11:41 PM
save prompt for user exit, but no save prompt for batch import? lpj Excel Discussion (Misc queries) 1 February 25th 06 02:08 AM
how do I prompt a user to update a cell in Excel? martb Excel Discussion (Misc queries) 1 September 12th 05 01:43 PM


All times are GMT +1. The time now is 10:54 AM.

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"