test.xlsmHi
I'm trying to write a very simple code (not using case select) to unhide columns based on variable entered into cell C5. (It's a number from 1 - 12 to represent a month)
I tried using offset columns based on the month entered (so... if month is March (3)... ) but I'm getting a error message that I can't figure out....
"Unable to set hidden range property of Range Class"... help?!
Sub RunningAverageQualityScore()
Dim iMonth As Integer 'review month
Dim FinalColumn As Integer 'end of chart
Dim FirstColumn As Integer 'beginning of chart
Dim ColumnsHide As Integer 'counts columns to hide
FinalColumn = Range("FinalColumn").Select
FirstColumn = Range("FirstColumn").Select
iMonth = Range("C5").Value
ColumnsHide = -12 + iMonth
Range("FinalColumn").Offset(0, ColumnsHide).Hidden = True
End Sub
Bookmarks