Sub error

  • Thread starter Thread starter Bernard Liengme
  • Start date Start date
B

Bernard Liengme

When I run your Sub it hides only G:I
I am not sure why you get otherwise.

Why all the selections? And what is the purpose of the scrolls?
Would this not do just as well?

Sub Done_Change2()
With Range("G11:H50")
.Locked = True
.FormulaHidden = False
End With
With Range("G54:H58")
.Locked = True
.FormulaHidden = False
End With
With Range("G62:H74")
.Locked = True
.FormulaHidden = False
End With
Columns("G:I").EntireColumn.Hidden = True
Range("D11").Select
End Sub

best wishes
 
Didn't see a problem. Try this

Sub Done_ChangeSAS()
With Range("G11:H50,G54:H58,G62:H74")
.Locked = True
.FormulaHidden = False
End With
Columns("G:I").Hidden = True
End Sub
 
I have created this macro but everytime I run it the Columns it hides is
incorrect. It hides FGHIJK it should only hide GHI. Can anyone tell me why
this is happening?
Thank you for your help.


Sub Done_Changes()
'
' Done_Changes Macro
'

'
Range("G11:H50").Select
Selection.Locked = True
Selection.FormulaHidden = False
ActiveWindow.SmallScroll Down:=42
Range("G54:H58").Select
Selection.Locked = True
Selection.FormulaHidden = False
ActiveWindow.SmallScroll Down:=9
Range("G62:H74").Select
Selection.Locked = True
Selection.FormulaHidden = False
ActiveWindow.SmallScroll Down:=-72
Range("D11").Select
Columns("G:I").Select
Range("G2").Activate
Selection.EntireColumn.Hidden = True
Range("D11").Select
End Sub
 
Back
Top