I've Made A User Form And I Need Help With Validation

Morrissey

Board Regular
Joined
Mar 8, 2002
Messages
85
Hi, everyone I've got yet another problem with my data form that I've made In VBA, I Want A Text Box Which Data Is Entered To Only Allow The Following values "20" and "40" And If Any Other Is Entered A Error Message Coming Up Saying "You Can Only Enter 20 And 40!" Here the Code I Currently Have And Would Appreciate Some Help Thank You! :)


Private Sub txtContainerType_Change()
Sheet1.Range("B19").Value = txtContainerType
End Sub
 
It's on the way...

Sbirro Cornuto, I just have to go drain the main vein, and then I'll have a look. Don't put too much faith in me though man, when God dealt out skills to me at birth, he gave me guitar, lovemaking, manhood size and chiselled good looks. VBA was number 7, behind glass blowing and the ability to sleep...
This message was edited by Audiojoe on 2002-03-20 07:13
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,214,835
Messages
6,121,880
Members
449,057
Latest member
Moo4247

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