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
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

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,882
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.
 

Forum statistics

Threads
1,141,144
Messages
5,704,541
Members
421,353
Latest member
jekoxien15

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top