T
Tonso
In an XL2003 spreadsheet I have the following code which places a
number in cell...
Sub DecimalSelect()
Dim answer As Variant
Dim result As Long
answer = Application.InputBox("Enter 2 or 3 for the number of
Decimals." & vbCrLf & "Your MUST be2 or 3.", "Get Number", Type:=1)
If TypeName(answer) = "Boolean" Then Exit Sub
ActiveSheet.Unprotect Password:="time"
Range("R9") = answer
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True _
, AllowFormattingCells:=True, Password:="time"
The code works, but what i wouild like is to restrict the the entry to
either '2' or '3', and not just prompt the user to enter 2 or 3. How
can I accomplish this in vba?
Thank you,
Tonso
number in cell...
Sub DecimalSelect()
Dim answer As Variant
Dim result As Long
answer = Application.InputBox("Enter 2 or 3 for the number of
Decimals." & vbCrLf & "Your MUST be2 or 3.", "Get Number", Type:=1)
If TypeName(answer) = "Boolean" Then Exit Sub
ActiveSheet.Unprotect Password:="time"
Range("R9") = answer
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True _
, AllowFormattingCells:=True, Password:="time"
The code works, but what i wouild like is to restrict the the entry to
either '2' or '3', and not just prompt the user to enter 2 or 3. How
can I accomplish this in vba?
Thank you,
Tonso