View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Gary Brown[_4_] Gary Brown[_4_] is offline
external usenet poster
 
Posts: 209
Default Disable the redX in a form

Do While MyValue = ""
MyValue = InputBox(Message, Title)
Loop

....will keep the inputbox showing until something is entered.
--
Hope this helps.
If this post was helpfull, please remember to click on the ''''YES''''
button at the bottom of the screen.
Thanks,
Gary Brown


"Ewing25" wrote:

Okay so i have a inputbox that pops up from this code.

Dim Message2, Title2, MyValue
Message = "Please Enter Last 5 Digits of Your Card Number"
Title = "AMEX Number" '<--Change
MyValue = InputBox(Message, Title)

If MyValue = "" Then
Sheets("Expense Amex").Protect password:="welcome"
Exit Sub

End If


Range("Cardholder_Number").AutoFilter
Range("Cardholder_Number").AutoFilter Field:=1, Criteria1:=MyValue,
visibleDropDown:=False
Sheets("Expense Amex").Protect password:="welcome"
On Error Resume Next

What i want to do is make it so they cant press the red X in the top right
of the form. how do i do this?

Thanks,
Alex