Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following input box running when a workbook is open...
Sub ZipCode() MyInput = InputBox("Please enter Zip Code") If MyInput = "10023" Then Worksheets("Sheets").Select If MyInput = "10024" Then .... and so on for the whole NYC metro area End Sub Now want to create a message box for the zip codes that are not included for example 00000,99999,66666. How do I accomplish this in few lines of code??? I started with the following... but this is obviously illegal.... I don't know how to include a wider range of values.... Sub ZipCode() If MyInput = "22222 to 99999" Then MsgBox "Area NOT covered", vbOKOnly, "TRY AGAIN!" End Sub Can any1 help?? --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Use RANDBETWEEN form & include certain #'s in the range | Excel Worksheet Functions | |||
Create PDF from XLS by VB Code using PDFMaker include Bookmarks | Excel Discussion (Misc queries) | |||
Code to include a one-up suffix to a field value | Excel Discussion (Misc queries) | |||
Code to include a one-up suffix to a field value | Excel Worksheet Functions | |||
Include a password in VB code. | Excel Discussion (Misc queries) |