RE: Programming problem
- From: Imran <Imran@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 6 Jun 2009 15:16:01 -0700
Thanks jacob, yes it is working through data validation but i want to control
it through vb programming as you mentioned below option2. but option vb
program is not working. i want to set the value with in a limit in a specific
cell eg. (a1 or b1) through vb same through minimum value to maximum value.
waiting your reply.
"Jacob Skaria" wrote:
Hi Imran.
1. Use Data validtion>Allow Whole number> Select the minimum and maximum and
from error alert tab "You can place a customized message"
2. If you want to have this programatically use the worksheet change event.
Chanage the range to suit your requirement.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim intCol As Integer
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A1")) Is Nothing Then
If Target.Value < 5 Or Target.Value > 100 Then
MsgBox " Invalid Entry": Target.Value = ""
End If
End If
Application.EnableEvents = True
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"Imran" wrote:
I want to fixed the cell to enter the data in specific range 5 to 100 or
100. basically i want to lock the worksheet cell and enter data in the cellwithin the specefic range that i will provide .
- References:
- Programming problem
- From: Imran
- RE: Programming problem
- From: Jacob Skaria
- Programming problem
- Prev by Date: Re: Enableling a shape
- Next by Date: RE: Programming problem
- Previous by thread: RE: Programming problem
- Next by thread: RE: Programming problem
- Index(es):
Relevant Pages
|