Message Box

confusedaquarian

New Member
Joined
May 25, 2011
Messages
1
I want to create a message box in excel if the criteria is wrong I would like to message box appear. Kindly help me to do this in the simplest way I could because I really don't know anything about excel, if possible step by step. Here is the scenario:

Cell A1 enter the student name
Cell B1 enter the student ID

Now if A1 is blank and the user will enter the student ID in B1 a message box should appear that "Student Name cannot be blank". Well there are these wise users who will try to put the name then they will enter the ID number but again they will go back to Student Name and delete it, the excel will accept it when saving (I want this to stop also).

The same message I need if ever the user will proceed to the next line but one of the field above either Student Name or Student ID is blank.

I hope I have explain this clearly. :confused:
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
There are a few ways to achieve this, but they work with macros, so macros need to be enabled.

This sometimes has problems of its own, as some companies/organisations prohibit the use of worksheets with non-certified macros.

Options:
  1. Prohibit entry into the sheet, and use a small user form to collect the entry and enter it in the sheet when all details are included
  2. Create a few macros that will check to see if the username is entered if the ID is being entered, if not throw up a message. Another macro that stops the sheet from being closed or saved if the student name / ID pair is not entered completely
The option 1 is the better one, but it needs a bit of work. Not too difficult to achieve though.
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,898
Members
452,948
Latest member
Dupuhini

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