View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default Worksheet_Change?

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("A1"), Target) Is Nothing Then
If IsNumeric(Target.Value) And Target.Value 200 Then
UserForm1.Show
End If
End If
End Sub

Let's say the value in cell A1 is 200; UserForm1 pops open.
--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"spreadsheetlady" wrote:

Hi,
I'm trying to automatically open a Form when a target cell contains an exact
text.

Example:
IF cell A1 says: "Oranges"
THEN
Open Form1.

I've only opened Forms using command buttons.
I was thinking maybe using Sub Worksheet_Change to do this?

If cell A1 says anything else, (false) Do not open Form1.

Thank-you in advance
Amy