Excel VBA Customer details Validation

firebird3334

New Member
Joined
Oct 22, 2013
Messages
6
I am doing a school project of creating an invoice for a shop.
One of the requirements is that i have to enter customer details like their name, adress 1, town, county, uk postcode and telephone number and have the form entries validated. Could someone take a look st my invoice and see what to do for the validations.
i could send it through email if you could post it down below.
THX.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
you will not learn much by asking us to do your project for you, and nobody will post their Email address on here. Have a go at it, or at least set out how you hope to tackle it and you will likely get assistance.
 
Upvote 0
you will not learn much by asking us to do your project for you, and nobody will post their Email address on here. Have a go at it, or at least set out how you hope to tackle it and you will likely get assistance.

I do not expect you to do the whole coursework for me. We have not been taught any VBA code. We are expected to find the codes online but the ones I have found doesn't work with the invoice I made so I am asking for help. I don't understand understand why those codes does not work.
I just need the codes for the validation for the informations i have listed below.
 
Upvote 0
ok - post the codes that "do not work" and show us the invoice you have made, please
OK. this code helps me enter just number but i am mot able to limit the digits to 11. I am not sure how to show my invoice though.

Private Sub TextBox2_Change()
OnlyNumbers
End Sub

Private Sub OnlyNumbers()
If TypeName(Me.ActiveControl) = "TextBox" Then
With Me.ActiveControl
If Not IsNumeric(.Value) And .Value <> vbNullString Then
MsgBox "Sorry, only numbers"
.Value = vbNullString
End If
End With
End If

End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,687
Members
449,117
Latest member
Aaagu

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