I have a macro which runs from a button on worksheet "Index" to hide unused rows on other sheets in the same workbook. The code I need assistance with:
' Rows("BeginUnused:EndUnused"
.Select
‘ This code works
Rows("5:99"
.Select
Selection.EntireRow.Hidden = True
"BeginUnused" in cell Index!C12 and "EndUnused" in cell Index!D12 are variables. If "BeginUnused" should change to 46, for example, I currently have to manually edit the macro. How do I use cell references in the Rows(xx:xx).Select statement?
Any assistance is greatly appreciated.
Michele
' Rows("BeginUnused:EndUnused"
‘ This code works
Rows("5:99"
Selection.EntireRow.Hidden = True
"BeginUnused" in cell Index!C12 and "EndUnused" in cell Index!D12 are variables. If "BeginUnused" should change to 46, for example, I currently have to manually edit the macro. How do I use cell references in the Rows(xx:xx).Select statement?
Any assistance is greatly appreciated.
Michele