Excel 2013 Compatibility Mode

Chris Waller

Board Regular
Joined
Jan 18, 2009
Messages
148
Morning,

Acolleague has sent me an Excel Spreadsheet which was in compatibility mode.This has converted it to Excel 2013. The problem is that 8 rows at the top ofthe spreadsheet which were not previously viewable are now fully on display andwhatever I try to do to hide these rows it doesn’t appear to work. There arequite a few macros in the Spreadsheet which filters the data and these rowscontain the filters, can anyone advise what I can do to hide these rows so thatthe Spreadsheet resembles the original? TIA
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Yongle

Well-known Member
Joined
Mar 11, 2015
Messages
6,093
Office Version
365
Platform
Windows
Try

Code:
Sheets("SheetName")[COLOR=#303336][FONT=inherit].[/FONT][/COLOR][COLOR=#303336][FONT=inherit]Range[/FONT][/COLOR][COLOR=#303336][FONT=inherit]([/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]"A1:A8"[/FONT][/COLOR][COLOR=#303336][FONT=inherit]).[/FONT][/COLOR][COLOR=#303336][FONT=inherit]EntireRow[/FONT][/COLOR][COLOR=#303336][FONT=inherit].[/FONT][/COLOR][COLOR=#303336][FONT=inherit]Hidden [/FONT][/COLOR][COLOR=#303336][FONT=inherit]= [/FONT][/COLOR][FONT=inherit][COLOR=#7d2727]True
[/COLOR][/FONT]
 
Last edited:

Yongle

Well-known Member
Joined
Mar 11, 2015
Messages
6,093
Office Version
365
Platform
Windows
Or perhaps

Code:
Sheets("SheetName").Range("A1:A8").RowHeight = 0
 

Chris Waller

Board Regular
Joined
Jan 18, 2009
Messages
148
Hi Yongle,

I have inserted a new module and inserted both lines you suggested and neither appear to work. Could you give any more details? TIA
 

Yongle

Well-known Member
Joined
Mar 11, 2015
Messages
6,093
Office Version
365
Platform
Windows
Code:
Sub HideRows
   Sheets("Sheet1").Range("A1:A8").EntireRow.Hidden = True
End Sub
Try the above code in a NEW workBOOK so that you can see that it works

If the "problem" worksheet is protected - that could be preventing you from altering row visibility
 
Last edited:

Chris Waller

Board Regular
Joined
Jan 18, 2009
Messages
148
I did copy your code to a new workbook and it did work. I will have to try to find out what password was used, unfortunately the person who developed the spreadsheet has left the department.
 

Watch MrExcel Video

Forum statistics

Threads
1,100,136
Messages
5,472,736
Members
406,834
Latest member
RahafKh

This Week's Hot Topics

Top