View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Randy Randy is offline
external usenet poster
 
Posts: 213
Default Hiding rows based on user input

I need help fixing the following code. Basically, if the user answers "no",
then I want to hide all of the rows in the worksheet that have a "v" in
column "A". I'm new to VBA but am learning thanks to everyone's help.

Thanks!

Randy

Select Case ProjectSize
Case Is = "l", "m"
resp = MsgBox("Will a vendor be used for this project?",
vbYesNo)

If resp = vbYes Then
vendor = ""
Else
vendor = "v"
For Each row In ActiveSheet.UsedRange.Rows
If row.cell = vendor Then
row.Hidden = True
End If
Next row

End If


End Select