run a userform by entering a number in a cell

  • Thread starter Thread starter ~Alan
  • Start date Start date
A

~Alan

XL2000
is it possible to run a userform by entering a number in a cell.

when I enter a number in a cell in column "DR1" thru "DR12" i would like
a userform to as me to enter qty and price is this possible
 
I have XL2000 not Event Procedures In Microsoft® Excel97
Also I am not very good with understanding alot of this.
I was looking for a little more help thank you
 
Hi
put the following code in your worksheet module (not in a standard
module):
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("DR1:DR12")) Is Nothing Then Exit Sub
On Error GoTo CleanUp
application.enableevents = false
With Target
If isnumeric(.Value) Then
'open your userform
End If
End With
CleanUp:
Application.EnableEvents = True
End Sub
 
Thank you for you help,, it works perfectly.


Frank said:
Hi
put the following code in your worksheet module (not in a standard
module):
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("DR1:DR12")) Is Nothing Then Exit Sub
On Error GoTo CleanUp
application.enableevents = false
With Target
If isnumeric(.Value) Then
'open your userform
End If
End With
CleanUp:
Application.EnableEvents = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top