ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide range (https://www.excelbanter.com/excel-programming/359065-re-hide-range.html)

Jim Thomlinson

Hide range
 
Without looking too close the first issue is that end row is declared as
integer. Integer only goes to 32k. Change it to a long...

Dim EndRw As long
--
HTH...

Jim Thomlinson


"David" wrote:

Hi
Can anybody please tell me what am I doing wrong here
Trying to hide certain rows
Sub aa()
Dim Rw As Integer
Dim EndRw As Integer
Rw = 100
EndRw = 65536
Rows(Rw & ":" & EndRw).Hidden = True
End Sub

Regards



All times are GMT +1. The time now is 04:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com