PDA

View Full Version : Solved: Screen / Worksheet Refresh



JimS
04-27-2011, 01:23 PM
I have a worksheet with 7 Active-X Checkboxes on it.

Once I'm done with the checkboxes I use the VBA below to hide them.

The checkbox 1-6 are hidden but the last one - checkbox7 does not go hidden.

Although if after the code runs and I go to Sheet55 and scroll down and then back up then checkbox7 disappears.

It's like the worksheet or screen needs to be refresh (I'm just guessing).

Any ideas why?

Unfortunatelly I will not be able to share this workbook due to it's content, sorry.

Thanks...

JimS



Sheet55.Select
Sheet55.Unprotect

ActiveSheet.Shapes("CheckBox1").Visible = False
ActiveSheet.Shapes("CheckBox2").Visible = False
ActiveSheet.Shapes("CheckBox3").Visible = False
ActiveSheet.Shapes("CheckBox4").Visible = False
ActiveSheet.Shapes("CheckBox5").Visible = False
ActiveSheet.Shapes("CheckBox6").Visible = False
ActiveSheet.Shapes("CheckBox7").Visible = False

Rows("3:12").Select
Selection.EntireRow.Hidden = True

Rows("14").Select
Selection.EntireColumn.Hidden = False

BrianMH
04-28-2011, 08:03 AM
at any point of your code do you use application.screenupdating = false?

JimS
04-28-2011, 10:45 AM
Yes, but cannot see where I didn't enable it right away. I just worked around it by moving to a different sheet.

Thanks away...