Excel 2003 - open work book useage agreement

M

mbotfield

I have an Excel 2003 workbook. I want to creat a window that when the
workbook is opened the window appears. In the window it shows text I have
written about the useage terms of the workbook. The user must agree by
clicking a I ACCEPT button to use the file or click I DO NOT ACCEPT and the
workbook closes.
 
M

Mike H

Hi,

Before we begin you need to understand that what your tring to do is a waste
of time in terms of security. This popup window and the accept/decline
buttons will be controlled by code so if your user opens with macros disabled
then all your security is gone. There are 'methods' of making such things a
bit more robust but in the final analysis they would not prevent anyone with
even a little knowledge from defeating whatever you put in place.

Still want to proceed?

Mike
 
M

mbotfield

Hi Mike H,

I understand what you are saying, however I would like to proceed becuase
the users are internal and they all use the same Marco settings.
 
M

Mike H

Hi,

Try this. Alt+F11 to open vb editor. Double cklick 'This workbook' and paste
the coode in on the right.

Private Sub Workbook_Open()

response = MsgBox("I want you to read this and" & Chr(13) & _
"Click OK that you agree", vbYesNo)

If response = vbNo Then ThisWorkbook.Close savechanges:=False
End Sub

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top