Hide empty rows in Excel worksheets



I'm working on a program that enabled the user to insert 10 information
and print them. I developed the forms using VBE.
I have specified all the information into their own cells in Excel
worksheets.

When the user insert Info1, the data will directly go to Row 2, Column
1 in Excel worksheet. When the user insert Info2, the data will
directly go to Row3, Column 1. Each info has their own formula.

What I wanted to do now is that, if let say, the user didn't insert
Info1, I want the program to automatically hide the row specified for
Info1, so that when the user print the form, the empty row is not on
the paper.

I tried to use this code, but it doesn't seems to work. Maybe because I
have specified the formula in the cells.

Code:
For i = 2 To 4
If Worksheets("PCR-Master").Cells(i, 1).Text <> "" Then
Worksheets("PCR-Master").Rows(i).EntireRow.Hidden = True
End If
Next i



Any ideas?
Thank in advanced

.



Relevant Pages

  • Re: Hide empty rows in Excel worksheets
    ... I have specified all the information into their own cells in Excel ... When the user insert Info1, the data will directly go to Row 2, Column ... in Excel worksheet. ... Info1, so that when the user print the form, the empty row is not on ...
    (microsoft.public.excel)
  • Re: Hide empty rows in Excel worksheets
    ... I have specified all the information into their own cells in Excel ... When the user insert Info1, the data will directly go to Row 2, Column ... in Excel worksheet. ... Info1, so that when the user print the form, the empty row is not on ...
    (microsoft.public.excel)
  • Re: Hide empty rows in Excel worksheets
    ... Ian wrote: ... If it is hiding the cells with data, but not the blank ones, then I'm ... in Excel worksheet. ... Info1, I want the program to automatically hide the row specified ...
    (microsoft.public.excel)
  • Re: Hide empty rows in Excel worksheets
    ... Thank you sooo much, Ian. ... If it is hiding the cells with data, but not the blank ones, then I'm ... When the user insert Info1, the data will directly go to Row 2, Column ... in Excel worksheet. ...
    (microsoft.public.excel)
  • Re: Hide empty rows in Excel worksheets
    ... If it is hiding the cells with data, but not the blank ones, then I'm ... When the user insert Info1, the data will directly go to Row 2, Column ... in Excel worksheet. ... Info1, so that when the user print the form, the empty row is not on ...
    (microsoft.public.excel)