Macro questions

Cruizer67

New Member
Joined
Jan 17, 2005
Messages
31
I have been able to get this to do what i want somewhat.. however i would like to be able to expand the numbers that I allow as being a good number Inputted also loop until canceled? please See Below
Would also like to make a macro instead of a userform...

all help is very welcomed :biggrin:

Private Sub CommandButton1_Click()

If Sheets("Sheet1").Range("A1").Value = "7" Then *** Would like to have other numbers used with this.. not just 7.. numbers can change or be added..***
UserForm2.Show
Else ***can i loop this until it is answered or canceled?***
With Sheets("Sheet1").Range("A1").ClearContents ***clear the whole row here***
MsgBox "Not a valid Number Please try again."
End With
End If
Unload Me
End Sub
[/b]
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,203,052
Messages
6,053,223
Members
444,648
Latest member
sinkuan85

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