View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Unhide Row when workbook is opened

One more dot:

..Rows(.Cells(.Rows.Count, "a").End(xlUp).Row + 1).Hidden = false
(added before the Cells() part)

Don Guillett wrote:

My error in not defining the last row. Notice the one dot before rows in
each case.

Private Sub Workbook_Open()
with Sheets("Daily Report")
.Rows(Cells(.Rows.Count, "a").End(xlUp).Row + 1).Hidden =false
end with
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Wanna Learn" wrote in message
...
Hello Again
below is my code - exactly- but when I open the workbook I get the
following
error message Run time error 9 subscript out of range when I select
debug the line that starts with Sheets("Daily Report") is highlighted in
yellow thank you for your patience and understanding

Private Sub Workbook_Open()
'if a row certain each time
'heets("sheet8").Rows(16).Hidden = False
'or if rows below last entry are hidden
Sheets("Daily Report").Rows(Cells(Rows.Count, "a").End(xlUp).Row +
1).Hidden
= False

End Sub


"Don Guillett" wrote:

put this into a workbook_open event in the ThisWorkbook module.

'if a row certain each time
Sheets("sheet8").Rows(16).Hidden = False
'or if rows below last entry are hidden
'sheets("sheet8").Rows(Cells(Rows.Count, "a").End(xlUp).Row + 1).Hidden =
False


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Wanna Learn" wrote in message
...
Hello I have a daily report and each day I add the results for the
previous day then I send out the report. Each line is for a day- (
e.g.
Oct 18 2007) So I have rows with dates until the end of the year 2007
.(
THere are formulas in the rows to calculate results) What I do is
unhide
the rows everyday enter the information then hide the other rows. So
when
you view the report the only rows that show are the ones with
information.
Is there a way to unhide the next row when I open the workbook everyday
I
have excel 2002 thanks



--

Dave Peterson