View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default if cell is greater than "" then run macro

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Address = "$L$12" And Target.Value < "" Then
UserForm1.Show
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Brad" wrote in message
...
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.