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

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,942
Members
449,094
Latest member
teemeren

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
Back
Top