I am relatively new to VB and I am trying to help a friend build an application form for work. Basically what I am trying to do is, there are 6 cells which need to be filled out (name, address etc) in this form on excel before printing will be allowed. There is a 'print' button to the left of the form and when it is pressed it would be great to have the cells that should be filled out, to highlight and have a message box pop up stating that fields have not been completed. Does anyone know how to do this? It would be so awesome of you.
Could you please upload a sample EXCEL file WITH sample data, macro, formula , conditional formatting etc on some shared site like https://authentification.site , http://docs.google.com,http://wikisend.com/ , http://www.editgrid.com etc and post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too
Hello, thank you for getting back to me. I have attached the file in question and let me try to reiterate what it is I am trying to do.
The cells that are red, the grey button to the left and the 'Terms and Conditions' check box are all that need work on. I have made a start with the 'customers name' cell where if it is not filled out a message box pops up prompting the user to fill it in. One of the things I need help with is I need the same thing to happen in all cells in red, as they are mandatory fields. Oh and not forgetting the check box.
Without technical know how I tried the follow layout so when the user tries to print the form, if the fields are not complete it will not print and flag up message telling them to fill in the cell.
If Range("J7") = "" Then
If Range("J9") = "" Then
If Range("J11") = "" Then
If Range("H27") = "" Then
If Range("H30") = "" Then
If Range("H33") = "" Then
And also the tick box needs to be tick so not to generate a message box as well.
Once that is done, the button to the left of the form is what I'd like to initiate the code. So when the user presses print, any fields or the check box that are not filled in will flag up an error message.
Then finally, if all fields are completed then the form should print fine.
It is a basic task for someone who knows what they are doing and it will be a brilliant learning curve for me to see the final code. As you have probably been able to tell already, I have no tech jargon which could make it difficult of you to understand what I am wanting. Do ask if you need any info to help understand my requirements. If you are able to help it would be brilliant. Benji.