View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default if cell is greater than "" then run macro

You'll need to use an event macro. Put this in the worksheet code module
(assuming a userform class named MyForm):

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim frmUser As MyForm
With Target
If .Address(False, False) = "L12" Then
If Not IsEmpty(.Value) Then
Set frmUser = New MyForm
frmUser.Show
End If
End If
End With
End Sub




In article ,
"Brad" wrote:

I'm trying to create a macro that will open a Userform. The requirement
would be, is if the end user enters any data in Cell L12 then the form would
open up, if that cell is blank then nothing would happen. The Data Value
would be Numerical or Text. I know this is a worksheet_change but not quite
sure what the proper coding is. Any help is appreciated.