View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dorothy Dorothy is offline
external usenet poster
 
Posts: 11
Default How can I use VB to hide Row 57 if cell A53 has a value of 1?

Worked perfectly. Thanks!!

"Jacob Skaria" wrote:

Select the sheet tab which you want to work with. Right click the sheet tab
and click on 'View Code'. This will launch VBE. Paste the below code to the
right blank portion. Get back to to workbook and try out.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$53" Then Rows(57).Hidden = (Target.Value = 1)
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Dorothy" wrote:

I have a pricing worksheet. If the person filling it out populates the QTY
field (cell A53) of the item in row 53 with a value of 1, then I want the
item in row 57 to "disappear", so it can't be selected also. Is there a VB
code I can use to accomplish this?

Thanks for your time!