Warning message

Zoidy

New Member
Joined
Jun 23, 2005
Messages
34
I want to be able to put a "Warning Message" that the user presses "ok" to once read when opening up an excel document.

Basically, open excel

Warning message appears not to touch certain data

Press Ok

Use the sheet

Any idea's what's the best way to manage this?
Macro maybe?

Thanks

Zoid
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
Hi -
Hit Alt + F11, from VBA Project, double click thisworkbook and paste this code to the module. save the file and close then open again.
Code:
Private Sub Workbook_Open()
MsgBox "This is a test message, click OK button to proceed", vbInformation + vbOKOnly, "Welcome Message"
End Sub
 

sykes

Well-known Member
Joined
May 1, 2002
Messages
1,752
Office Version
  1. 365
Platform
  1. Windows
Hi Zoid

Easiest way is to put a simple bit of code into the workbook's open event:

1. Use Alt + F11 to bring up the VBA window.
2. Find the project explorer if not already open, and open it.
3. Find your project in the explorer.
4. Right-click "This workbook" and select "View Code"
5. In the left hand dropdown select "workbook", and the righthand one, "open"
6. You should see this:
Code:
Private Sub Workbook_Open()

End Sub
7. Copy and paste this in:
Msgbox "Please don't touch the data marked leave off!!"
8. Whole lot should look thus:

Code:
Private Sub Workbook_Open()
MsgBox "Please don't touch the data marked leave off!!"
End Sub

9.Save the workbook
10. Close & re-open.

Change the text in the messagebox to suit your needs.
In the VBA window go to help (for VBA help, not Excel help), and look up msgbox. It will give you a lot more options apart from the basic message I've discussed here.

All the best.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,353
Messages
5,528,199
Members
409,807
Latest member
nicky736

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top