Hi all,
I have set up a userform that is used to format a report to show only the reporting period selected. Basically hiding and unhiding columns along witha bit of formatting etc.
The macro was working fine but I have had to make changes recently and I am now getting this error on the line highlighted red in the code below:
Run-Time error '1004':
Unable to set the Hidden property of the Range class
Sub MarchReport()
Sheets("Data").Select
Range("B6:CN6").Select
With Selection
.MergeCells = False
End With
August1
September1
October1
November1
December1
January1
February1
March1
March
April
May
Columns("H:CO").Select
Selection.EntireColumn.Hidden = False
Range("I:AX,AZ:AZ").Select
Range("AZ1").Activate
ActiveWindow.SmallScroll ToRight:=9
Range("I:AX,AZ:AZ,BE:BE,BG:BG,BL:BL,BN:BN").Select
Range("BN1").Activate
ActiveWindow.SmallScroll ToRight:=8
Range("I:AX,AZ:AZ,BE:BE,BG:BG,BL:BL,BN:BN,BS:CN").Select
Selection.EntireColumn.Hidden = True
Range("B6:CN6").Select
With Selection
.MergeCells = True
End With
End Sub
Can someone please help me?
cheers,
Pedros.
Bookmarks