Disclaimer

G

Gary Thomson

Hi,

Not sure if this is the right group, but here goes anyway:

I notice in several financial models that I get sent that
a "disclaimer" pops up when I load the Workbook up, where
I need to click "I accept" before I can view the
workbook. I need to do something similar. How do I get
this???

Many Thanks,

Gary Thomson
 
P

Paul B

Gary, Here is one way, it will bring up a message box when you open the
workbook, if you click no the workbook will close, that is if you enable
macros when you open the book. You could also hide the sheets and use a
macro to unhide them so if somebody opened the book with macros disabled the
sheets would not show.
Security in excel is not very strong so if somebody wants to see the file
there are ways to do it.

Private Sub Workbook_Open()
Msg = "Put you message here" _
& Chr(10) & "Do You accept?"
Title = "Disclaimer"
Response = MsgBox(Msg, vbYesNo + vbQuestion, Title)

If Response = vbNo Then
ThisWorkbook.Close
Exit Sub
End If

End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 
G

Gary Thomson

Paul,

I have entered the code in Visual Basic, but when I closed
the workbook (after saving) then re-opened, nothing is
happening. Why is this??

Gary.
 
P

Paul B

Gary, To put in this macro, from your workbook right-click the workbook's
icon and pick View Code. This icon is to the left of the "File" menu this
will open the VBA editor, in the left hand window double click on
thisworkbook, under your workbook name, and paste the code in the window
that opens on the right hand side, press Alt and Q to close this window and
go back to your workbook, now this will run every time you open the
workbook. If you are using excel 2000 or newer you may have to change the
macro security settings to get the macro to run.
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 

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