Show hidden rows

bruno.trudo

Board Regular
Joined
Jan 14, 2004
Messages
98
Hi,
I have this trouble: I have hidden some rows in my workbook. Then I saved this workbook and closed it.
Now I have reopened it and I would like to show some hidden rows again. When I try to use VBA code, there comes an error message.
Does anybody know a solution?
Bruno
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
To unhide rows:

1. select the rows either side of the hidden area
2. from the menu select Format > Row > Unhide.

With VBA I think the code is:

Rows("x:y").EntireRow.Hidden = False

Where x and y are the start and end rows to unhide.
 
Upvote 0
Yes, as you write it works, but not in my case.
I have hidden for row 8:65536, it means to the end. So I cannot select hidden rows.
VBA code shows an error message and then Excel freezes up.
So any other idea?
 
Upvote 0
I just tried running the two subs shown below, and it worked fine for me. What is the error message?

Sub Hide()

Rows("8:65536").EntireRow.Hidden = True

End Sub

Sub Unhide()

Rows("8:65536").EntireRow.Hidden = False

End Sub
 
Upvote 0
As another idea try selecting all cells (CTRL-A) and then selecting unhide from the Format > Row menu.
 
Upvote 0
So I cannot select hidden rows.
VBA code shows an error message and then Excel freezes up
Hello,

Silesia? :biggrin:

Yes, hidding the 65536th row / 256th column sometimes causes troubles, don't hide it unless you must.

Try if explicit selecting of A1 before you run the hidding/unhidding helps:
So I cannot select hidden rows.
<pre><SPAN style="color:#00007F">Sub</SPAN> blah()
[A1].Select
[8:10].EntireRow.Hidden = <SPAN style="color:#00007F">False</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></pre>

Martin
 
Upvote 0
Thank you both guys (y) ,
Martin, your solution works of course, but not in case I save and close my workbook and open it again. I think this is the source of trouble.
Then comes an error message:
Run-time error '1004'
Application-defined or object-defined error
Maybe it is my local trouble.
The only thing working by me is CTRL-A and then unhide from the menu as chappelg wrote. Thanks
Because I hid just empty rows I finally decided to use rows.insert method instead of hidding. It works but I am not sure this way is right

bruno
 
Upvote 0

Forum statistics

Threads
1,213,504
Messages
6,114,020
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top