eHow launches Android app: Get the best of eHow on the go.

How to Create a Message Box in Excel VBA

Video Preview

Summary: Create a message box based on visual base codes, or VBA's, in Excel by going to tools and then selecting macros. Create a message box for VBA's in Excel with tips from an assistant certified public accountant in this free video on Microsoft Excel.

Views:
1,883
Presenter
By Amar Enhsaihan
eHow Presenter

Amar Enhsaihan is an assistant certified public accountant (CPA) and works with Excel applications everyday on his job.read more

Post a Comment

Post a Comment

Video Transcript

"Hi, I'm Amar Enhsaihan, I'm going to show you how to use error messages that are based on visual base codes in Excel. Here on my example, I have a persons name and age. I created an error message that would show up if I choose age that's below eighteen and over a hundred. So, let me show you how I did it. First of all, I named this field as crass, and the value that's currently in the field is fifty six, so if you'll go to visual base six, you go to out F 11, and then you'll see this. And, first of all, you need to click the sheet where the visual basic card is going to be used, right click, insert and then insert the module. I already inserted the module and that's module one. If you double click on it, you'll see my codes, this is visual basic codes. I have sub, name of the code, open bracket, close bracket, actual code is, starts with "if" if range, and then crass value, if the crasses value is more than a hundred, or if the crass value is less than eighteen, then message box, and here you type whatever you want, the error message to be. I've wrote please enter, correct age, and then, and if, ends up and that's what it is. If you go back to Excel, you click Excel button, and you see fifty six, let's see if error message will show up if I type in hundred and two. For the visual basic to work you have to use tools, macros, macros, and then that's my macro, age, which I named in the sub, and then click run, and error message showing up. Please enter correct age. O.k, what if it's less than eighteen, eleven? Tools, macros, macros, run. Error message, shown up. O.k, what if we enter correct age, fifty seven. Tools, macros, macros, run, no error message. So, this proves that our error message is working and that's how you create error messages using visual basic in Excel. I'm Amar Enhsaihan, thank you for watching!"

eHow Article: How to Create a Message Box in Excel VBA

Related Ads

  • Have you done this? Click here to let us know.
Computers
Alexia Petrakos,

Meet Alexia Petrakos eHow's Computers Expert.

Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics